(19) باب تَمَنِّي الْمَرِيضِ الْمَوْتَ
Narrated Anas bin Malik:
The Prophet (ﷺ) said, "None of you should wish for death because of a calamity befalling him; but if he has to wish for death, he should say: "O Allah! Keep me alive as long as life is better for me, and let me die if death is better for me.' "
Reference: Sahih al-Bukhari 5671
In-book reference: Book 75, Hadith 32
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 7, Book 70, Hadith 575