Everyone will experience the loss of a loved one. When the Prophet lost his son Ibrahim, he wept but also praised God, the source of life and death. People who believe in God and in the Afterlife handle death well. The same is true with calamities and tribulations. Maurice Bucaille, the well-known French physician, said that what attracted his interest in Islam was how North Africans in France faced death. As a physician exposed to disease and death, he observed many of his own countrymen not knowing how to die or handle death.
The fear of death is natural. Reflexively, one protects himself from it. When angels in the form of human beings visited Prophet Abraham he offered them food. When he saw that they did not reach for the food, he grew fearful. Scholars say that Abraham thought they had come to take his life. The Prophet encouraged believers to desire a long life for two reasons: to make up for past iniquities or to increase good deeds.
The one who remembers death is ennobled by certain characteristics. One of them is contentment and a lack of covetousness. The Prophet said, "Contentment is a treasure that is never exhausted." He also prayed, "O God, provide for my family with what suffices them and grant them contentment with it." The wealthy soul is one that is content. This contentment is not the kind that originates from stupidity or not knowing any better. It is contentment that is informed by knowledge and by reflection on death and its meaning.
Second, the remembrance of death gives one energy to achieve good deeds: Wealth and sons are the ornaments of the life of this world, while enduring righteous deeds are better with your Lord in reward and better in hope (QURAN, 18:46).
Third, remembrance of death engenders seeking repentance when one slips or errs. Penitence rectifies wrong action, and that is the gift of remembering death. When one lives with this realization, he or she becomes prompt in seeking God's forgiveness. Those who are heedless of death have no compunction in doing wrong, since death is not a factor in their lives. They carelessly view the Day of Judgement as some distant event hardly worth worrying about or some ancient notion formed in a primordial epoch of human development.
"Purification of the Heart" - Hamza Yusuf, pp. 135, 136