Narrated Anas bin Malik: The Prophet, peace be upon him, said, “None of you should wish for death because of a calamity befalling him. But if he has to wish for death, he should say: “O Allah! Keep me alive as long as life is better for me, and let me die if death is better for me’.”
[7: 575- O.B. Sahih Al-Bukhari)