´Thabit narrated from Anas, that:` The Prophet entered upon a young man while he was dying. So he said: "How do you feel?" He said: "By Allah! O Messenger of Allah! Indeed I hope in Allah and I fear from my sins." So the Messenger of Allah said: "These two will not be gathered in a worshipper's heart at a time such as this, except that Allah will grant him what he hopes and make him safe from what he fears."
Hadith Referenceسنن ترمذي / كتاب الجنائز عن رسول الله صلى الله عليه وسلم / 983
´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.”
Maulana Ataullah Sajid
Benefits and Issues:
➊ Visiting a sick person and inquiring about his well-being is Sunnah. This is especially emphasized when the condition of the patient is such that the end seems near.
➋ At the time of death, a servant should keep both hope and fear in view. However, the aspect of hope should be predominant.
➌ If a servant’s heart contains both hope and fear, then he attains the mercy of Allah, and in this way, he is granted protection from the wrath of Allah.
Source: Commentary on Sunan Ibn Mājah by Mawlānā ‘Atā’ullāh Sājid, Page: 4261