Wishing for Death in Islam: Permissible?
Question

If a Muslim is faced with many problems in life, and cannot resolve them, is it permissible for him to pray that he may die, so that he will find relief from these problems?.
Praise be to Allah.Firstly: A long life in which a believer does righteous deeds is better for him than death. 
The Prophet (peace and blessings of Allah be upon him) said: “The best of people is the one who lives long and does good.” Narrated by Ahmad and al-Tirmidhi, 110; classed as saheeh by al-Albani in Saheeh al-Tirmidhi. 
And he (peace and blessings of Allah be upon him) said: “Glad tidings to the one who lives long and does good.” Narrated by al-Tabaraani and Abu Na’eem, classed as saheeh by al-Albani in Saheeh al-Jaami’, 3928. 
Ahmad (8195) narrated that Abu Hurayrah (may Allah be pleased with him) said: Two men became Muslim with the Prophet (peace and blessings of Allah be upon him). One of them was martyred, and the other remained for another year. Talhah ibn ‘Ubayd-Allah said: I was shown Paradise (in a dream), and in it I saw that the one who was delayed was admitted before the martyr. I was surprised by that, so the next morning I told the Messenger of Allah (peace and blessings of Allah be upon him) about that. The Messenger of Allah (peace and blessings of Allah be upon him) said: “Did he not fast Ramadaan after he was gone, and pray six thousand rak’ahs, or such and such a number of rak'ahs, the prayers of one year?” Classed as saheeh by al-Albani in al-Silsilah al-Saheehah, 2591. al-‘Ajlooni said in Kashf al-Khafa’: its isnaad is hasan. 
A man said: “O Messenger of Allah, which of the people is best?” He said: “The one who lives long and does good.” He said: “Which of the people is worst?” He said: “The one who lives long and does evil.” Narrated by Ahmad and al-Tirmidhi, 2330; classed as saheeh by al-Albani in Saheeh al-Tirmidhi. 
Al-Teebi (may Allah have mercy on him) said: Time is like the capital of a businessman, and it should be invested in such a way as to make a profit.  The greater the capital, the greater the profit. Whoever benefits from his life by doing good deeds will succeed and prosper, but whoever wastes his capital and does not prosper will evidently lose out. End quote. 
Hence it was said to one of the salaf: Death is a good thing. 
He said: O son of my brother, do not do that, for an hour of life in which you ask Allah for forgiveness is better for you than an eternity of death. 
It was said to an old man among them: Would you not like to die? He said: No, for youth and its evil have gone, and old age and its goodness have come. When I get up, I say Bismillaah (in the name of Allah), and when I sit I say Al-hamdu Lillaah (praise be to Allah), and I would like this to continue. 
Many of the salaf would weep when they were dying, in sorrow for the cessation of their righteous deeds. 
Hence the Prophet (peace and blessings of Allah be upon him) forbade wishing for death, because it deprives the believer of the goodness of obedience and the joy of worship, and of the opportunity to repent and make up for what one has missed. 
It was narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “No one of you should wish for death or pray for it before it comes, for when one of you dies, his good deeds come to an end and for the believer a long life will not increase him in anything but good.” Narrated by Muslim, 2682 
So he mentioned the prohibition of wishing for death alongside the prohibition on praying for one's own death. 
A version narrated by al-Bukhari says: “No one of you should wish for death. Either he is a doer of good and will do more, or he is a doer of evil but perhaps he may stop.” 
Al-Nawawi said: This hadeeth clearly indicates that it is makrooh to wish for death because of some harm that has befallen one, such as loss or distress caused by an enemy, or other such hardships of this world. But if a person fears harm or fitnah with regard to his religious commitment, it is not makrooh to wish for death, according to this hadeeth, and several of the salaf did that. 
There is another reason why wishing for death is not allowed: 
The throes of death are very hard, and the terror of seeing one's end draw nigh is immense. Man is faced with nothing else like it. Moreover, no one knows what awaits him after death. We ask Allah to keep us safe and sound. Wishing for death is seeking something which is unknown.  Perhaps if he wishes for death because of some hardship that he has fallen into, he may end up like one who jumps out of the frying pan and into the fire, and after death he may find himself in an even worse situation. In that case, wishing for death is akin to seeking to hasten calamity before it happens. No wise man should do that, as the Prophet (peace and blessings of Allah be upon him) said: “Do not wish to meet the enemy, and ask Allah to keep you safe and sound.” (Agreed upon). A hadeeth to this effect has been narrated, but it is da’eef (weak).  
It was narrated that Jaabir ibn ‘Abd-Allah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Do not wish for death, for the terror that follows death is immense. It is a sign of blessing to live long and be guided by Allah to repent.” Narrated by Ahmad; classed as da’eef by al-Albani in Silsilat al-Ahaadeeth al-Da’eefah, 885. 
Ibn ‘Umar heard a man wishing for death and he said: “Do not wish for death, for you are going to die. Ask Allah to keep you safe and sound, for the dying person is exposed to great terror.”  
Ibn Rajab (may Allah have mercy on him) said: Many righteous men have wished for death when they were healthy, then when it came they hated it because it is so difficult, such as Abu’l-Darda’ and Sufyaan al-Thawri, so what do you think about people other than them? 
Wishing for death, if the reason for it is difficulties in worldly matters, is forbidden because wishing for death in that case is indicative of impatience or panic as a result of the calamity that has befallen. 
It was narrated from Anas ibn Maalik (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “No one of you should wish for death because of some harm that has befallen him, but if he must do that then let him say: ‘O Allah, keep me alive so long as life is good for me, and cause me to die when death is good for me.’” Agreed upon. 
What is meant by “some harm that has befallen him” is worldly harms such as sickness, loss of wealth and children, and the like. But if he fears harm to his religious commitment, such as fitnah, then there is nothing wrong with wishing for death in that case, as we shall see below. 
Perhaps the one who wishes for death in order to find relief from the harm that has befallen him will only increase in exhaustion and pain, he does not know.  
It was narrated that ‘Aa’ishah (may Allah be pleased with her) said: It was said: “O Messenger of Allah, So and so has died, and has found relief.” The Messenger of Allah (peace and blessings of Allah be upon him) got angry and said: “Only the one who is forgiven finds relief.” Narrated by Ahmad, 24192; classed as saheeh by al-Albani in al-Silsilah al-Saheehah, 1710. 
Secondly: There are some cases in which it is prescribed to wish for death, such as the following: 
1 – One who fears for his religious commitment because of fitnah 
Undoubtedly death which takes a person away from fitnah (tribulation, temptation that takes one away from religious commitment), even if his righteous deeds are few, is better for him than being subjected to tribulations with regard to his religious commitment. We ask Allah to keep us safe and sound. 
It was narrated from Mahmoud ibn Labeed (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “There are two things that the son of Adam dislikes: death, although death is better for a believer than fitnah; and he dislikes having little wealth, but less wealth means less reckoning.” Narrated by Ahmad; classed as saheeh by al-Albani in al-Silsilah al-Saheehah, 813. 
The fact that wishing for death in this situation is also prescribed is  indicated by the words of the Prophet (peace and blessings of Allah be upon him) in his du’aa’: “If You should decree fitnah for Your slaves, then take my soul (in death) before I am put to trial.” Narrated by al-Tirmidhi, 3233; classed as saheeh by al-Albani in Saheeh al-Jaami’. 
Ibn Rajab (may Allah have mercy on him) said: This is permissible according to the majority of scholars. 
Based on this, the reports of the salaf wishing for death are to be understood as meaning that they wished for death for fear of fitnah. 
Maalik narrated that Sa’eed ibn al-Musayyab said: When ‘Umar ibn al-Khattab came from Mina, he made his camel kneel at al-Abtah, and then he gathered a pile of small stones and cast his cloak over them and dropped to the ground. Then he raised his hands to the sky and said, 'O Allah! I have become old and my strength has weakened. My flock is scattered. Take me to You with nothing missed out and without having neglected anything.'
Sa’eed said: Dhu’l-Hijjah did not end before ‘Umar (may Allah be pleased with him) was murdered. 
Abu Hurayrah (may Allah be pleased with him) said: Whoever sees death offered for sale, let him buy it for me! 
Al-Thabaat ‘inda al-Mamaat, by Ibn al-Jawzi, p. 45 
2 – When his death is martyrdom for the sake of Allah, may He be glorified and exalted. 
There are many ahaadeeth which indicate that wishing for death in this case is prescribed, such as the following: 
It was narrated from Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “Were it not that it would be too hard for my ummah, I would not have stayed behind from any campaign. Would that I could be killed for the sake of Allah, then brought back to life then killed, then brought back to life then killed.” Agreed upon.  
The Messenger (peace and blessings of Allah be upon him) wished to be killed for the sake of Allah, and that was only because of the great virtue of martyrdom. 
Muslim (1909) narrated that the Prophet (peace and blessings of Allah be upon him) said: “Whoever asks Allah sincerely for martyrdom, Allah will cause him to attain the status of the martyr, even if he dies in his bed.”  
The salaf (may Allah be pleased with them) loved the idea of dying for the sake of Allah. 
Abu Bakr (may Allah be pleased with him) said, concerning the liar Musaylimah, when he claimed to be a prophet: “By Allah, I will fight him with people who love death as they love life.” 
Khaalid ibn al-Waleed (may Allah be pleased with him) wrote to the people of Persia saying: “By the One besides Whom there is no other god, I shall send against you people who love death as you love life.” 
This status is something desirable – may Allah not deprive us of it – and seeking it is something that is praiseworthy, because the one who is given it will not be deprived of the reward for righteous deeds for which a person may want to live and which may be better for a person than death. Moreover Allah will spare the one who attains this status from the torment of the grave. 
It was narrated that Salmaan (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings of Allah be upon him) say: “Standing on guard at the border for one day and one night is better than fasting and praying qiyaam for a month, and if he dies, will be given the reward for the good deeds that he used to do, and he will be given provision, and he will be kept safe from al-fattaan [i.e., Munkar and Nakeer, the two angels who question the deceased in the grave].”  
Muslim, 1913. 
Conclusion: It is makrooh for a Muslim to wish for death if the reason for that is some worldly harm that has befallen him. Rather he must be patient and seek the help of Allah. We ask Allah to grant you relief from the distress that you are suffering. 
See also question no. 22880. 
And Allah knows best.