Sayyiduna Anas (may Allah be pleased with him) reports that the Messenger of Allah (peace and blessings be upon him) said: None of you should wish for death because of any calamity or affliction that befalls him. If he must wish, then he should say: O Allah! Keep me alive as long as life is better for me, and cause me to die when death is better for me.
`Sayyiduna Abu Hurairah (may Allah be pleased with him) reports that` the Messenger of Allah (peace and blessings be upon him) said: None of you should wish for death, nor should he pray for death before it comes to him. For when any one of you dies, his deeds come to an end, and for the believer, the longer he lives, the more good he does (because he performs more righteous deeds).