The Prophet ﷺ said, "Whoever loves to meet Allah, Allah loves to meet him, and whoever hates to meet Allah, Allah hates to meet him."Ayesha, or one of his other wives, said, "But we hate death."He replied, "That is not what is meant. Rather, when death approaches the believer, he is given good news of Allah's pleasure and honor, so nothing is more beloved to him than what lies ahead. He loves to meet Allah, and Allah loves to meet him. But when death approaches the disbeliever, he is given news of Allah's punishment and retribution, so nothing is more hateful to him than what lies ahead. He hates to meet Allah, and Allah hates to meet him."
عن النبي ﷺ قال: من أحب لقاء الله أحب الله لقاءه، ومن كره لقاء الله كره الله لقاءه، قالت عائشة أو بعض أزواجه: إنا لنكره الموت. قال: ليس ذاك، ولكن المؤمن إذا حضره الموت بشر برضوان الله وكرامته، فليس شيء أحب إليه مما أمامه، فأحب لقاء الله وأحب الله لقاءه، وإن الكافر إذا حضر بشر بعذاب الله وعقوبته، فليس شيء أكره إليه مما أمامه، كره لقاء الله فكره الله لقاءه.
Bukhari narrated it in the Book of Raqaq (6507), and Muslim in the Book of Dhikr and Dua (2683), both of them from Hammam, who said, Qatada narrated to us, from Anas, from Ubada bin Samit, and he related it. The wording given is that of Bukhari, while Muslim's wording is abridged.