On the Undesirability of Praying for Death
Riyad as-Salihin (Gardens of the Righteous)
Riyad as-Salihin 588
Abu Hurairah relates that the Holy Prophet said: No one of you should wish for death, for if he is virtuous it is possible that he might add to his good works, and if he is an evil doer he might be able to remedy his past (Bokhari and Muslim). Muslim's version is: No one of you should wish or pray for it before it comes to him. When he dies his actions will be terminated; and in the case of a believer his age only adds to good for him.
وفى رواية لمسلم عن أبي هريرة رضي الله عنه عن رسول الله صلى الله عليه وسلم قال: “لا يتمن أحدكم الموت، ولا يدع به من قبل أن يأتيه، إنه إذا مات انقطع عمله، وإنه لا يزيد المؤمن عمره إلا خيراً”.
Riyad as-Salihin 589
Anas relates that the Holy Prophet said: No one of you should wish for death because of any misfortune that befalls him. Should anyone be sore afflicted, he should say: Allah, keep me alive so long as life is the better for me, and cause me to die when death is the better for me (Bokhari and Muslim).
Riyad as-Salihin 590
Qais ibn Hazum relates: We went to visit Khubaib ibn Arat in his illness. He had his blood let at seven places. He said: Our companions who have passed on before have lost nothing in respect of the world and we have found that the only place for it is in the earth. Had the Holy Prophet not forbidden us praying for death, I would have prayed for it. Thereafter we visited him again and he was repairing a wall. He said: There is a reward for a Muslim in respect of everything on which he spends money except when he commits it to clay (Bokhari and Muslim).