Research in the UK and in the US seems consistent in identifying the principal factors that contribute to someone committing suicide. According to the American Association of Suicidology, major depression is the psychiatric diagnosis most commonly associated with suicide. The risk of suicide in people with major depression is about 20 times that of the general population. About two thirds of people who complete suicide are depressed at the time of their deaths. That's a very high percentage.
The risk of someone suffering from an untreated major depressive disorder trying to commit suicide is around 1 in 5 (20%). However, the suicide risk among treated patients is around 1 in 1,000 (0.1%). That would point to treatment for depression substantially reducing the risk of suicide, so maybe there is hope for feeling better.
Research studies would point to the following being major factors triggering people to attempt to kill themselves. Note that more than 90 percent of people who die by suicide have the top two risk factors: