Wishing for death when faced with troubles

A: It is not permissible for Muslims to hate life and be desperate of the good and relief that Allah stores for them. In fact, they are required to endure their predestination and have confident anticipation of Allah's Recompense. Moreover, they should ask Allah (Glorified be He) to (Part No. 25; Page No. 399) relieve them of the calamities that have befallen them, help them, reward them for their endurance, and wait for Allah's relief. Allah (Glorified be He) says, Verily, along with every hardship is relief, Verily, along with every hardship is relief (i.e. there is one hardship with two reliefs, so one hardship cannot overcome two reliefs). It is disliked for Muslims to wish for death because of some harm that has befallen them, such as a disease, distress, or the like. It was related in the Two Sahih (authentic) Books of Hadith (i.e. Al-Bukhari and Muslim) on the authority of Anas (may Allah be pleased with him) that the Messenger of Allah (peace be upon him) said, None of you should wish for death because of a calamity which has befallen them; but if it is unavoidable to do so, let them say: O Allah, make me live so long as life is better for me and make me die if death is better for me. Also, an absolute death wish involves a kind of objection to predestination, while the wording of the Hadith denotes a kind of submission to it.The calamities which befall Muslims in this world will be Kaffarah (expiation) for their sins if they have confident anticipation of Allah's Recompense and do not feel discontented about them. Moreover, these calamities waken the heart from its negligence and provide the afflicted with lessons for the future.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.