Sunan an-Nasa'i 1820
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.
لاَ يَتَمَنَّيَنَّ أَحَدُكُمُ الْمَوْتَ لِضُرٍّ نَزَلَ بِهِ فِي الدُّنْيَا وَلَكِنْ لِيَقُلِ اللَّهُمَّ أَحْيِنِي مَا كَانَتِ الْحَيَاةُ خَيْرًا لِي وَتَوَفَّنِي إِذَا كَانَتِ الْوَفَاةُ خَيْرًا لِي "
It was narrated form Anas that the Messenger of Allah said:
"None of you should wish for death because of some harm that befalls him, rather he should say: 'Allahumma ahini ma kanatil-hayatu khairanli wa tawaffani idha kanatil-wafatu khairanli (O Allah, keep me alive so alive so long as life is good for me, and cause me to die when death is good for me.)"'
Full reference and source
Sunan an-Nasa'i 1820 In-book : Book 21, Hadith 3 English translation : Vol. 3, Book 21, Hadith 1821
View source on Sunnah.com (opens in a new tab)