Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates: The Prophet Muhammad (peace and blessings be upon him) said: No person should ever wish for death due to any worldly hardship that befalls him. Rather, he should say: O Allah! Keep me alive as long as life is better for me, and give me death when death is better and superior for me.
Hadith Referenceصحیح ابن حبان / كتاب الجنائز وما يتعلق بها مقدما أو مؤخرا / 2966
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح: ق - مضى (964). تنبيه!! رقم (964) = (968) من «طبعة المؤسسة». - مدخل بيانات الشاملة -.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده قوي على شرط مسلم