The Prophet ﷺ visited a young man who was on the verge of death and asked him, "How do you feel?"The young man replied, "By Allah, Messenger of Allah, I hope in Allah, and I fear my sins."The Messenger of Allah ﷺ said, "These two never combine in the heart of a servant at such a moment without Allah granting him what he hopes for and securing him from what he fears."
أن النبي ﷺ دخل على شاب وهو في الموت، فقال: كيف تجدك؟ قال: والله! يا رسول الله! إني أرجو الله، وإني أخاف ذنوبي، فقال رسول الله ﷺ: لا يجتمعان في قلب عبد في مثل هذا الموطن إلا أعطاه الله ما يرجو وآمنه مما يخاف.
Tirmidhi (983) and Ibn Majah (4261) both narrated it through Sayar bin Hatim, who said, Jafar bin Sulayman narrated to us, from Thabit, from Anas, and he mentioned it. Its chain is hasan due to Sayar bin Hatim, and the discussion of him is elaborated in the Book of Funerals.