حَدَّثَنَا عَبْدُ الْأَعْلَى بْنُ حَمَّادٍ النَّرْسِيُّ ، حَدَّثَنَا عُثْمَانُ بْنُ عُمَرَ ، أَخْبَرَنَا شُعْبَةُ ، عَنْ عَبْدِ الْعَزِيزِ بْنِ صُهَيْبٍ ، قَالَ : سَمِعْتُ أَنَسَ بْنَ مَالِكٍ ، يَقُولُ : قَالَ رَسُولُ اللهِ - صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ - : لَا يَتَمَنَّيَنَّ الْمُؤْمِنُ الْمَوْتَ لِضُرٍّ نَزَلَ بِهِ ، فَإِنْ كَانَ لَا بُدَّ فَاعِلًا ، فَلْيَقُلِ : اللَّهُمَّ أَحْيِنِي مَا كَانَتِ الْحَيَاةُ خَيْرًا لِي ، وَتَوَفَّنِي إِذَا كَانَتِ الْوَفَاةُ خَيْرًا لِي .
It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "No believer should ever wish for death because of some hardship that has befallen him; and if he must do so (because of the severity of his distress), then he should say: 'Allahumma ahyini ma kanat al-hayatu khayran li, wa tawaffani idha kanat al-wafatu khayran li' (O Allah, keep me alive as long as life is better for me, and grant me death when death is better for me)."