Sunan Ibn Majah, Volume 5, Book 37, Hadith 4261 (DarusSalam)

It was narrated from Anas that the Prophet entered upon a young man who was dying and said: “How do you feel?” He said: “I have hope in Allah, O Messenger of Allah, but I fear my sins.” The Messenger of Allah said: “These two things (hope and fear) do not coexist in the heart of a person in a situation like this, but Allah will give him that which he hopes for and keep him safe from that which he fears.”

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ الْحَكَمِ بْنِ أَبِي زِيَادٍ، حَدَّثَنَا سَيَّارٌ، حَدَّثَنَا جَعْفَرٌ، عَنْ ثَابِتٍ، عَنْ أَنَسٍ، ‏:‏ أَنَّ النَّبِيَّ ـ صلى الله عليه وسلم ـ دَخَلَ عَلَى شَابٍّ وَهُوَ فِي الْمَوْتِ فَقَالَ ‏:‏ ‏"‏ كَيْفَ تَجِدُكَ ‏"‏ ‏.‏ قَالَ ‏:‏ أَرْجُو اللَّهَ يَا رَسُولَ اللَّهِ وَأَخَافُ ذُنُوبِي ‏.‏ فَقَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏:‏ ‏"‏ لاَ يَجْتَمِعَانِ فِي قَلْبِ عَبْدٍ فِي مِثْلِ هَذَا الْمَوْطِنِ إِلاَّ أَعْطَاهُ اللَّهُ مَا يَرْجُو وَآمَنَهُ مِمَّا يَخَافُ ‏"‏ ‏.‏

sunnah.com