Allah and His Messenger, peace be upon him, encourage us to contemplate death and be ready for it with good deeds. This is regarded as a sign of goodness. Ibn ‘Umar reports: “I came to the Prophet, peace be upon him, and I was the tenth of the first ten people (who embraced Islam). A man from among the Ansar got up and said: “O Prophet of Allah, who is the most sagacious and the most prudent among the people?” He replied: “Those who are most aware of death and prepare themselves for it. They are the wisest of people and will have honor in this world and a generous reward in the Hereafter’.” Ibn ‘Umar also said that Allah’s Messenger, peace be upon him, said: “You should remember the reality that brings an end to all worldly joys and pleasures, namely, death.” (Both hadith are narrated by At-Tabarani with a sound chain of narrators)
Ibn Mas’ud narrated that the Messenger of Allah, peace be upon him, explained the following words of Allah, the Exalted: “The hearts of those whom Allah wills to guide, He opens to Islam.” (Qur’an 6.125) This means, the Messenger explained, that, “When the light (of truth) enters the heart it expands and opens up.” The Companions asked: “Is there any evidence of this (in the life of a Muslim)?” He replied: “Being ever mindful of the eternal life of the Hereafter, and remaining at guard in this life of delusion, and preparing oneself for death before it comes.” This is reported by Ibn Jarir through different chains each of which strengthens the other.