One of the most interesting things is the awakening a person experiences while on his deathbed. At that stage he becomes very alert and frustrated on a level that is beyond imagination; he starts regretting his past and wishing that his death is postponed to make up for what he missed and to make sincere repentance for he is certain of his death, so his remorse almost kills him even before he is dead.
If this state of attentiveness and awakening occurred while a person is enjoying youth and health, then he would have achieved all the objectives of righteous actions.
An intelligent person should nevertheless, envision the moment of his death and then act accordingly. If he is unable to envision the moment as it is in reality, he should (at least) imagine it as per his level of awakening for it will surely repel blameworthy desires and entice praiseworthy endeavours.
As for those who always thinks about the moment of death, they will become captive to it just like the case of Habib Al-'Ajml who used to sav to his wife every morning, ‘If I were to die today, then let so and so wash me, and so and so carry me [to my grave].’
A man told Ma'ruf Al-KarkhI, ‘I am willing to lead you in the Dhuhr [prayer], but I may not be able to do so in the ‘Asr [prayer].’ So Ma'ruf replied, ‘What makes you certain that you will live until ‘Asr [prayer]? I seek refuge with Allah from having such high hopes (tulal-aml)’
A man degraded another man behind his back in Ma'rufs presence, so he said to the man: ‘Remember the cotton that they will put on your eyes (when preparing you for burial)!’
[Captured Thoughts: Imâm Ibn al Jawzi, Chapter 99, Page 368-369]