Hadithcore
Riyad as-Salihin, 40

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". <b>[Al- Bukhari and Muslim]</b>.

وعن أنس رضي الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏

‏ لا يتمنين أحدكم الموت لضر أصابه، فإن كان لابد فاعلاً فليقل‏:‏ اللهم أحيني ما كانت الحياة خيراً لي وتوفني إذا كانت الوفاة خيراً لي‏

‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏ ‏.‏

References1 variant
In-Book Reference
Introduction, Hadith 40
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) It instructs against wishing for death at times of trials and distress because it runs counter to the obligation of patience and indicates the impatience of the distressed individual.<br> 2) A believer relies on Allah in all of his affairs and loves to meet Him, Glorified and Exalted; for the best of people is the one whose life is long and his deeds are good.
Related hadiths6
Compare isnād across 6 related chains →