(30) باب الدُّعَاءِ بِالْمَوْتِ وَالْحَيَاةِ
Narrated Anas:
Allah's Messenger (ﷺ) said," None of you should long for death because of a calamity that had befallen him, and if he cannot, but long for death, then he should say, 'O Allah! Let me live as long as life is better for me, and take my life if death is better for me.' "
Reference: Sahih al-Bukhari 6351
In-book reference: Book 80, Hadith 48
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 8, Book 75, Hadith 362