Hadith 13165

(حديث مرفوع) حَدَّثَنَا رَوْحٌ ، حَدَّثَنَا شُعْبَةُ ، قَالَ : سَمِعْتُ ثَابِتًا الْبُنَانِيَّ ، قَالَ : سَمِعْتُ أَنَسَ بْنَ مَالِكٍ يُحَدِّثُ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، أَنَّهُ قَالَ : " لَا يَتَمَنَّ أَحَدُكُمْ الْمَوْتَ مِنْ ضُرٍّ أَصَابَهُ ، فَإِنْ كَانَ لَا بُدَّ فَاعِلًا ، فَلْيَقُلْ اللَّهُمَّ أَحْيِنِي مَا كَانَتْ الْحَيَاةُ خَيْرًا لِي ، وَتَوَفَّنِي مَا كَانَتْ الْوَفَاةُ خَيْرًا لِي " .
It is narrated from Hazrat Anas bin Malik (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: None of you should wish for death because of any hardship that befalls him. If wishing for death becomes necessary, then he should say: O Allah! Keep me alive as long as life is better for me, and grant me death when death is better for me.
Hadith Reference مسند احمد / مسند المكثرين من الصحابة / 13165
Hadith Grading حکم دارالسلام: إسناده صحيح، خ: 6351، م: 2680.