Sahih al-Bukhari 6351
Sahih al-Bukhari · Book 80: Invocations · The invocation for death or life
Narrated Anas:
حَدَّثَنَا ابْنُ سَلاَمٍ ، أَخْبَرَنَا إِسْمَاعِيلُ ابْنُ عُلَيَّةَ ، عَنْ عَبْدِ الْعَزِيزِ بْنِ صُهَيْبٍ ، عَنْ أَنَسٍ ـ رضى الله عنه ـ قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ يَتَمَنَّيَنَّ أَحَدٌ مِنْكُمُ الْمَوْتَ لِضُرٍّ نَزَلَ بِهِ، فَإِنْ كَانَ لاَ بُدَّ مُتَمَنِّيًا لِلْمَوْتِ فَلْيَقُلِ اللَّهُمَّ أَحْيِنِي مَا كَانَتِ الْحَيَاةُ خَيْرًا لِي، وَتَوَفَّنِي إِذَا كَانَتِ الْوَفَاةُ خَيْرًا لِي " .
Allah's Messenger (ﷺ) said," None of you should long for death because of a calamity that had befallen him, and if he cannot, but long for death, then he should say, 'O Allah! Let me live as long as life is better for me, and take my life if death is better for me.' "