Hadith 2966
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.