Is it haram to pray for death?
The Prophet says:
"Let none of you wish for death on account of an affliction that befalls him. If he has no alternative, let him pray: O God, grant me life so long as it is good for me to be alive, and take my life if death is good for me." [Bukhari and Muslim, quoted in Riyāḍ al-Ṣāliḥīn Book 1, Hadith 586)
Since praying for death is an expression of hopeless in God’s ability to make our life better, the following saying of Prophet Ibrāhīm also applies to it:
He said, “And who despairs of his Lord’s mercy but those who are misguided?” (The Quran, 15:56)
Therefore it does not befit a believer to pray for death. They should instead leave the matter in God’s hands and let Him decide their fate. Rather than praying for death, wait patiently until God changes your circumstances. Also please check out the following essay: Islam and Depression: A Survival Guide.