Caveat: I am NOT and expert, and this just MY opinion as every one else here has.
There were a few times in my life that in great moments of despair that I thought that it would be better that I was dead.
Thinking on it now many years later and where circumstances have changed to the positive, I realize that at those times I was feeling the lowest thoughts at that time, because of losing hope.
Also because I was feeling dead in the situation I erroneously thought that what should follow is actual death of my body too?
I also realized that my actions would impact others in a unexpected way and if in another life I would have to atone for that action, so it was best to struggle though the situation to find a solution other than ending my life.
A life is valuable and its loss impacts others for their life as well.
It was through suffering, whether mental or physical that I learned to get stronger in mind and body and also learned to become reliant and more confident in my own development to become more resilient in life’s ups and downs.
Thus and I am happy that I have more understanding of my experiences good or bad as that makes up who I am now.