He hates life and wishes for death
Question

What is the Islamic ruling on a man who hates this life very much, and asks Allah to cause him to die if that is good for him, and he is waiting for death?
Praise be to Allah.It is not permissible for a Muslim to hate life and despair of what Allah, may He be exalted, could grant him of relief and good health. What is required of him is to bear with patience whatever he is facing of what Allah has willed and decreed, and to seek reward with Him, may He be exalted, for what befalls him of calamities, and to ask Him, may He be glorified, to avert that from him, to help him and to reward him for what He decrees should befall him of that. And he should wait for relief from Allah, as He, may He be glorified, says (interpretation of the meaning): “For indeed, with hardship [will be] ease.  Indeed, with hardship [will be] ease” [ash-Sharh 94:5-6]. It is makrooh for a Muslim to wish for death because of some harm that befell him, such as sickness, hardship or anything else. In as-Saheehayn it is narrated that Anas (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “No one of you should wish for death because of some harm that befalls him. But if he must do that, then let him say: ‘O Allah, cause me to live so long as life is good for me, and cause me to die so long as that is good for me.’” From the wording of the hadith, we understand that this is a kind of delegating one’s affairs to Allah and submitting to His will and decree. Whatever befalls a Muslim of calamities in this world is an expiation for him, if he seeks reward for that with Allah, may He be exalted, and does not become discontent. This is a wake-up call to turn away from heedlessness, and a lesson for the future.
And Allah is the source of strength. May Allah send blessings and peace upon our Prophet Muhammad and his family and companions. End quote.
Shaykh ‘Abd al-‘Azeez ibn ‘Abdullah ibn Baaz, Shaykh ‘Abd al-‘Azeez Aal ash-Shaykh, Shaykh Saalih al-Fawzaan, Shaykh Bakr Abu Zayd.
Fataawa al-Lajnah ad-Daa’imah li’l-Buhooth al-‘Ilmiyyah wa’l-Ifta’ (25/398).