Is it permissible to wish for death? İs it haram to wish for death? The short answer is…
No matter how much difficulty a believer faces, s/he should not wish for death. Because these hardships are also a part of the divine test and those who show patience will win a great reward. The Prophet Muhammad (saw) said, “None of you should wish for death due to any hardship he faces. If he is in an extraordinary trouble so that he wants to die, he should say: “O Allah! Keep me alive so long as life is good for me, and take my life when death is good for me.” (Tirmidhi, Qiyamah, 26)
Source: Presidency Of Religious Affairs The Turkey, High Board of Religious Affairs FATWAS