The Prophet ﷺ said, "Whoever loves to meet Allah, Allah loves to meet him, and whoever hates to meet Allah, Allah hates to meet him."
عن النبي ﷺ قال: من أحب لقاء الله أحب الله لقاءه، ومن كره لقاء الله كره الله لقاءه.
Bukhari narrated it in the Book of Raqaiq (6507), and Muslim in the Book of Remembrance and Supplication (2683), both through the route of Hammam, from Qatada, from Anas bin Malik, from Ubada bin Samit, who mentioned it. The wording given here is Bukhari's.