There are cases of suicide in the Bible, but these were primarily acts of desperation in the heat of a moment rather than the result of prolonged depression. God's prophets expressed some seemingly suicidal thoughts in times of distress, but the Bible does not indicate that any of these righteous men desired to kill themselves or that they ever attempted to do so.
Judas Iscariot, the disciple who betrayed Jesus, is the most prominent example of suicide in the Bible. When Judas saw that Jesus had been condemned to die, he suddenly realized the gravity of what he had done:
"Then Judas, [Jesus'] betrayer, seeing that He had been condemned, was remorseful and brought back the thirty pieces of silver to the chief priests and elders, saying, 'I have sinned by betraying innocent blood.' . . . Then he threw down the pieces of silver in the temple and departed, and went and hanged himself" (Matthew 27:3-5 Matthew 27:3-5  Then Judas, which had betrayed him, when he saw that he was condemned, repented himself, and brought again the thirty pieces of silver to the chief priests and elders,
 Saying, I have sinned in that I have betrayed the innocent blood. And they said, What is that to us? see you to that.
 And he cast down the pieces of silver in the temple, and departed, and went and hanged himself.
American King James Version×).
Judas hastily committed suicide because he was unable to cope with his guilt before God. His act of suicide along with his apparent remorse has caused many to wonder: Is Judas Iscariot in Hell?
There are also examples in the Bible in which men committed suicide to avoid impending death at the hands of an enemy. These include Saul, the first king of ancient Israel, who took his own life after being injured in battle (1 Samuel 31:4-5 1 Samuel 31:4-5  Then said Saul to his armor bearer, Draw your sword, and thrust me through therewith; lest these uncircumcised come and thrust me through, and abuse me. But his armor bearer would not; for he was sore afraid. Therefore Saul took a sword, and fell on it.
 And when his armor bearer saw that Saul was dead, he fell likewise on his sword, and died with him.
American King James Version×). Another was Ahithophel, an advisor to King David who had betrayed him and so was at risk of death when David regained control (2 Samuel 17:23 2 Samuel 17:23And when Ahithophel saw that his counsel was not followed, he saddled his ass, and arose, and got him home to his house, to his city, and put his household in order, and hanged himself, and died, and was buried in the sepulcher of his father.
American King James Version×).
The story of Samson is related but stands in unique contrast. Having been captured by the Philistines and forced to entertain them, he famously pulled down an entire building as a final act of defiance and died in the process (Judges 16:28-30 Judges 16:28-30  And Samson called to the LORD, and said, O Lord God, remember me, I pray you, and strengthen me, I pray you, only this once, O God, that I may be at once avenged of the Philistines for my two eyes.
 And Samson took hold of the two middle pillars on which the house stood, and on which it was borne up, of the one with his right hand, and of the other with his left.
 And Samson said, Let me die with the Philistines. And he bowed himself with all his might; and the house fell on the lords, and on all the people that were therein. So the dead which he slew at his death were more than they which he slew in his life.
American King James Version×). While this could technically be considered suicide, it was in fact a self-sacrificing demonstration of his restored faith in God.
Finally, there are numerous servants of God whose lives became so difficult that they wanted to die or even wished they had never been born, but none of these men actually articulated the intention or desire to kill themselves. Among these are righteous Job (Job 6:8-11 Job 6:8-11  Oh that I might have my request; and that God would grant me the thing that I long for!
 Even that it would please God to destroy me; that he would let loose his hand, and cut me off!
 Then should I yet have comfort; yes, I would harden myself in sorrow: let him not spare; for I have not concealed the words of the Holy One.
 What is my strength, that I should hope? and what is my end, that I should prolong my life?
American King James Version×), the great prophets Elijah (2 Kings 19:2-4 2 Kings 19:2-4  And he sent Eliakim, which was over the household, and Shebna the scribe, and the elders of the priests, covered with sackcloth, to Isaiah the prophet the son of Amoz.  And they said to him, Thus said Hezekiah, This day is a day of trouble, and of rebuke, and blasphemy; for the children are come to the birth, and there is not strength to bring forth.  It may be the LORD your God will hear all the words of Rabshakeh, whom the king of Assyria his master has sent to reproach the living God; and will reprove the words which the LORD your God has heard: why lift up your prayer for the remnant that are left.
American King James Version×) and Jeremiah (Jeremiah 20:14-18 Jeremiah 20:14-18  Cursed be the day wherein I was born: let not the day wherein my mother bore me be blessed.  Cursed be the man who brought tidings to my father, saying, A man child is born to you; making him very glad.  And let that man be as the cities which the LORD overthrew, and repented not: and let him hear the cry in the morning, and the shouting at noontide;  Because he slew me not from the womb; or that my mother might have been my grave, and her womb to be always great with me.  Why came I forth out of the womb to see labor and sorrow, that my days should be consumed with shame?
American King James Version×), and the reluctant prophet Jonah (Jonah 4:3-8 Jonah 4:3-8  Therefore now, O LORD, take, I beseech you, my life from me; for it is better for me to die than to live.  Then said the LORD, Do you well to be angry?  So Jonah went out of the city, and sat on the east side of the city, and there made him a booth, and sat under it in the shadow, till he might see what would become of the city.  And the LORD God prepared a gourd, and made it to come up over Jonah, that it might be a shadow over his head, to deliver him from his grief. So Jonah was exceeding glad of the gourd.  But God prepared a worm when the morning rose the next day, and it smote the gourd that it withered.  And it came to pass, when the sun did arise, that God prepared a vehement east wind; and the sun beat on the head of Jonah, that he fainted, and wished in himself to die, and said, It is better for me to die than to live.
American King James Version×). The apostle Paul, who suffered incredible physical and emotional difficulties in preaching the gospel, noted that it would be more comfortable for him to die but that he submitted himself fully to the will of God, since living meant that he could continue to preach the gospel and serve God's people (Philippians 1:19-25 Philippians 1:19-25  For I know that this shall turn to my salvation through your prayer, and the supply of the Spirit of Jesus Christ,  According to my earnest expectation and my hope, that in nothing I shall be ashamed, but that with all boldness, as always, so now also Christ shall be magnified in my body, whether it be by life, or by death.  For to me to live is Christ, and to die is gain.  But if I live in the flesh, this is the fruit of my labor: yet what I shall choose I know not.  For I am in a strait between two, having a desire to depart, and to be with Christ; which is far better:  Nevertheless to abide in the flesh is more needful for you.  And having this confidence, I know that I shall abide and continue with you all for your furtherance and joy of faith;
American King James Version×).
Suicide is a difficult and tragic reality in modern culture that should never take place. If you or someone you know is having suicidal thoughts, please seek immediate professional help. God loves every individual and does not desire that any of us should suffer under the weight of sin, guilt, depression or suicidal thoughts. He is willing to forgive you from any sin, and He has a purpose for your life. That purpose requires action that is sometimes difficult to bear, but the end result is joy and peace that no one can take from us (John 16:22 John 16:22And you now therefore have sorrow: but I will see you again, and your heart shall rejoice, and your joy no man takes from you.
American King James Version×). The prophets and apostles suffered greatly during their lifetimes, and their examples teach us to be strengthened in faith and to fix our hope on deliverance from God.