English : Vol. 5, Book 37, Hadith 4265
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لاَ يَتَمَنَّى أَحَدُكُمُ الْمَوْتَ لِضُرٍّ نَزَلَ بِهِ فَإِنْ كَانَ لاَ بُدَّ مُتَمَنِّيًا الْمَوْتَ فَلْيَقُلِ : اللَّهُمَّ أَحْيِنِي مَا كَانَتِ الْحَيَاةُ خَيْرًا لِي وَتَوَفَّنِي إِذَا كَانَتِ الْوَفَاةُ خَيْرًا لِي "
4265 It was narrated from Anas that the Messenger of Allah (ﷺ) said:
"None of you should wish for death because of some harm that befalls him. If he must wish for death, let him say: "O Allah, keep me alive so long as living is good for me and cause me to die when death is good for me.'"
Full reference and source
English : Vol. 5, Book 37, Hadith 4265 Arabic : Book 37, Hadith 4406
View source on Sunnah.com (opens in a new tab)