I think wanting a way out is a very common response to being in pain, especially chronic pain, whether it's physical or emotional or both. Another factor can be feeling like life is pointless, feeling alone, lost, aimless, like the universe and life has no purpose.
A lot of people have been there. I know I have at times. On average, about 129 people kill themselves per day in USA according to https://afsp.org/about-suicide/suicide-statistics/.
Suicide rates have been steadily rising since 1999, according to https://www.washingtonpost.com/news/to-your-health/wp/2018/06/07/u-s-suicide-rates-rise-sharply-across-the-country-new-report-shows/?noredirect=on&utm_term=.d48c89a082cc.
I thought this video on the topic was well done and worth sharing.EXIT: The Appeal of Suicide - YouTube
Remember that the way you feel today isn't how you will always feel. Feelings are feelings. They change from day to day, moment to moment. Your life has value, no matter who you are or what you've done or what's happened to you in your life. There is a reason you're here (God created you) and there's a reason you're suffering (sin and evil has corrupted God's perfect created world).
You are loved by God, and God has shown that love in coming here among sinful men who whipped, beat, mocked and crucified the Savior of the world. The devil thought he'd won, but he was wrong.
Jesus rose again from the dead, and lives and reigns forever and will be back to judge the world.
It was God's plan all along, to become the substitute for us, to rescue us from our own misery and suffering and sin and unworthiness in his sight as we've broken his laws countless times with our own awfulness. Jesus Christ is the only name under heaven by which we can be saved. Your soul has been saved, your sins have been paid for, you are loved by Jesus, the holy and sinless Son of God who took our suffering and death for us, so that when our life ends or when he comes back to judge the world of sin, we might be counted blameless on the account of Jesus Christ rather than guilty on our own account of words, thoughts, and actions.
Your life has meaning, your life has value. You are loved by God.
To learn more about him, start reading the Bible and see what a loving and merciful God we rotten human beings have.