Sahih Muslim , Hadith 2680 ⓘ
Anas (b. Malik) reported Allah's Messenger as saying. None of you should make a request for death because of the trouble in which he is involved, but if there is no other help to it, then say: O Allah, keep me alive as long as there is goodness in life for me and bring death to me when there is goodness in death for me.
حَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا إِسْمَاعِيلُ، - يَعْنِي ابْنَ عُلَيَّةَ - عَنْ عَبْدِ الْعَزِيزِ، عَنْ أَنَسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ يَتَمَنَّيَنَّ أَحَدُكُمُ الْمَوْتَ لِضُرٍّ نَزَلَ بِهِ فَإِنْ كَانَ لاَ بُدَّ مُتَمَنِّيًا فَلْيَقُلِ اللَّهُمَّ أَحْيِنِي مَا كَانَتِ الْحَيَاةُ خَيْرًا لِي وَتَوَفَّنِي إِذَا كَانَتِ الْوَفَاةُ خَيْرًا لِي " .
also referenced under: Book 48, Hadith 10 (In-Book) & Book 35, Hadith 6480 (USC-MSA)
This hadith has been narrated on the authority of Anas through another chain of transmitters, but with a small variation of wording.
حَدَّثَنَا ابْنُ أَبِي خَلَفٍ، حَدَّثَنَا رَوْحٌ، حَدَّثَنَا شُعْبَةُ، ح وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا عَفَّانُ، حَدَّثَنَا حَمَّادٌ، - يَعْنِي ابْنَ سَلَمَةَ - كِلاَهُمَا عَنْ ثَابِتٍ، عَنْ أَنَسٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم بِمِثْلِهِ غَيْرَ أَنَّهُ قَالَ " مِنْ ضُرٍّ أَصَابَهُ " .
also referenced under: Book 48, Hadith 11 (In-Book) & Book 35, Hadith 6481 (USC-MSA)
Nadr b. Anas reported, as when Anas was alive, that he said: Had Allah's Messenger not stated this.." None should make a request for death," I would have definitely done that.
حَدَّثَنِي حَامِدُ بْنُ عُمَرَ، حَدَّثَنَا عَبْدُ الْوَاحِدِ، حَدَّثَنَا عَاصِمٌ، عَنِ النَّضْرِ بْنِ أَنَسٍ، وَأَنَسٌ، يَوْمَئِذٍ حَىٌّ قَالَ أَنَسٌ لَوْلاَ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " لاَ يَتَمَنَّيَنَّ أَحَدُكُمُ الْمَوْتَ " . لَتَمَنَّيْتُهُ .
also referenced under: Book 48, Hadith 12 (In-Book) & Book 35, Hadith 6482 (USC-MSA)