SHAFAQNA – The Grand Ayatollah Safi Golpayegani answered a question about suicide.
Question: Is thinking about suicide Haram?
The Grand Ayatollah Safi: Thinking about suicide on its own is not considered to be a sin; but thinking about the sin causes darkening of the heart and prevents the human being to succeed, and it is possible that it forces the person to prepare first steps for Haram. To avoid satanic temptations, it is necessary for the human being not to think about the sin. It must be noted that suicide is a major sin and causes the person to be inflicted with Divine Punishment. And the person who relies on God, problems cannot overwhelm him/her and make him/her to suicide.
Source: PERSIAN SHAFAQNA