Jonah, the prophet, felt that, he being an Isrealite, should have a right not to warn the pagan city of Nineveh. Therefore, he ran from God and the word of God. When God sent a storm, Jonah requested to be thrown into the sea. After being swallowed by a large fish, he half-way repented, but held to the right not to tell Nineveh of God's mercy and grace. He preached, "Forty days and you will be destroyed!"
When the city repented, and God turned from His wrath,
Jonah became very angry. He turned his anger inward, asking God to
take his life, then withdrew from God and the people. God gave him
a gourd vine to protect him from the sun, but later sent a worm to eat
the vine. This time Jonah felt that he should have the right to have
the vine and wished to die. When God questioned Jonah's anger, Jonah
responded, "I do well to be angry, even unto death!"
Jonah could have overcome the suicidal thoughts by yielding his personal rights to God. This may also be the first step for you in overcoming suicidal thoughts.
You may find more on suicide at: Some
Real Answers For Suicidal Thoughts