It is not permissible to wish for death?

Q 3: I am a young man suffering from a very bad psychological condition. I used to always wish for death so that I might find rest. Is this permissible? What can I do? I have weak Iman (faith) and my family and everyone is blaming me for my wish to die. (Part No. 3; Page No. 524

A: It is not lawful for you to wish for death, because of the general prohibition given by the Prophet (peace be upon him) in the Hadith: No one of you should wish for death because of a calamity which has befallen them. However, if it is unavoidable to wish, let them say, 'O Allah, keep me alive as long as life is better for me and make me die when death is better for me.' We advise you to repent to Allah and ask for His Forgiveness. We also recommend doing a lot of good deeds, fulfilling religious obligations, befriending righteous people, keeping company with them, and avoiding bad company. We hope that Allah will cure you and guide your heart to the truth.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.