Basically, suicide is an act totally forbidden in Islam. Allah says, “And do not cast yourselves into destruction by your own hands.” (ِAl-Baqarah: 195) “And do not kill yourselves, for surely Allah is Compassionate to you.” (An-Nisa’: 29) “And do not take the life which Allah has rendered sacrosanct.” (Al-Isra’: 33). The Prophet (peace and blessings be upon him) said, “Whoever willfully falls from a mountain top and thus kills himself, he shall be in hell-fire, ever falling down from on high into the fire for ever; whoever consumes poison and thus kills himself will be doing the same thing to himself in the fire of hell; whoever kills himself with an instrument, he will be continuously piercing his own abdomen with the same in hell-fire for ever.” (Reported by Bukhari and Muslim).
So, suicide is not an option for a Muslim. Islamic teachings tell us that in committing suicide, one will incur the wrath of Allah to the extent that after death, one will suffer eternal punishment, i.e. a person committing suicide will be made to kill himself over and over again by the same means with which he took his own life.
Referring to the aforementioned fact, Thabit Ibn Ad-Dahhaak quoted the Prophet, peace and blessings be upon him, as saying: “Whoever intentionally swears falsely by a religion other than Islam, then he is what he has said (e.g. if he says, ‘If such thing is not true then I am a Jew,’ he is really a Jew). And whoever commits suicide with piece of iron will be punished with the same piece of iron in the Hell-Fire.” (Reported by Al-Bukhari)
Also, the Hadith you quoted: the Prophet, peace and blessings be upon him, is also reported to have said: “A man was inflicted with wounds and he committed suicide, and so Allah said: My slave has caused death on himself hurriedly, so I forbid Paradise for him.”
This is a horrible fate for anyone. Nothing in our lives could be so out of control to the extent of considering ending our lives, especially knowing the punishment that is awaiting us if we choose to do so.
The common reason behind thinking of suicide is always despair. As regards the remedy of this state, we’d like also to cite the following: “The remedy is hope. Allah made hopelessness unlawful by saying, “Do not despair of Allah’s mercy.” (Yusuf: 87) Thus, no matter at what level of despair, depression and frustration we are, whether loss of a loved one or a job, or as the result of anger from someone else, we must not give up hope as there is a ray of hope at the end of the tunnel. The greatest hope is mercy from Allah.
Hope is the medicine which keeps one alive and going, which is when we say, hang on, we mean hang onto the thread of hope. It is not unnatural to be sad over situations and events. Even Prophet Muhammad, peace and blessings be upon him, used to be sad, looking at the plight of Unbelievers and their rejection of his message for Oneness of Allah, and not becoming Muslims. And Allah reminded him by saying, “Lo! thou (O Muhammad) guidest not whom thou lovest, but Allah guideth whom He will.” (Al-Qasas: 56)
During dejection, there is darkness, but in hope, there is light. Therefore, one must pray for this light to illuminate the heart so that we can see beyond what is causing the suffering today. If I knew that I would not see tomorrow, I might get depressed, but the fact that I hope I will see tomorrow with all its goodness, the love of my family, my friends, dear ones, the flowers, that I go to sleep in peace, turning myself to Allah. We must pray for Allah’s mercy and forgiveness so that we can love and forgive ourselves and Allah’s other creations and have peace with ourselves, our Creator, and our surroundings.
We Muslims believe that all our suffering, failures and adversities are nothing but a test from Allah, who has said, “And surely We shall try you with something of fear and hunger, and loss of wealth and lives and crops; but give glad tidings to the steadfast, who say, when a misfortune striketh them: Lo! To Allah we belong and unto Him we are returning.” (Al-Baqarah: 155-56)”