Stop attempting suicide if you don’t want to die.
Wanting to get out of the pain of life is completely different than wanting to die. If you don’t want to die then you have to stop. It sounds like you are reaching a point that you are not going to try it again.
You are getting older now and will hopefully be more logical and less impulsive even if your brain is working against you sometimes.
Call the suicide hotline provided above if you need help on a really bad day.
Suicide is permanent. Having trouble dealing with a current life situation is temporary.
Pay attention to what is making you sad and in pain and take steps to not fall into that circumstance again. Find things to look forward to and plan them. Planning and anticipating the joyful things is part of joy and hope for the future. I know that’s really difficult when anxious or depressed.
Give yourself some time. I usually want to wallow in my sadness for a while before I can find the strength to come out of it. As I get older my ability to get out of it is much better. That is true in study after study regarding emotional pain and happiness. An older brain statistically feels less emotional pain. We learn the patterns and how to cope. We experience more joy as we age usually. You have to get there to enjoy it.