Narrator:Anas ibn Mālik
وعن أنس رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم :
" لا يتمنين أحدكم الموت لضر أصابه، فإن كان لابد فاعلاً فليقل: اللهم أحيني ما كانت الحياة خيراً لي وتوفني إذا كانت الوفاة خيراً لي"
Anas (May Allah be pleased with him) reported that:
The Messenger of Allah (ﷺ) said, "Let not one of you wish for death because of a misfortune which befalls him. If he cannot help doing so, he should say: 'O Allah, keep me alive as long as You know that life is better for me, and make me die when death is better for me".
[Al- Bukhari and Muslim].
Reported by Al-Bukhari (No. 5671, 6351), Muslim (No. 2680a), Abu Dawud (No. 3108), At-Tirmidhi (No. 971), An-Nasa’i (No. 1820, 1821, 1822), Ibn Majah (No. 4265) and Ahmad (No. 11541, 11577, 12203, 12294, 12550, 12689, 13090, 13483). Cited in Riyad as-Salihin (No. 40).