In II Maccabees 14:37-46, we encounter the story of Razis, a devout Jew who committed suicide. He was so highly regarded that people called him "a father of the Jews." Consequently, the Seleucid general Nicanor decided to teach the Jews a lesson by sending 500 soldiers to arrest him. But vv 41-42 says, "Being surrounded, Razis fell upon his own sword, preferring to die nobly rather than to fall into the hands of sinners and suffer outrages unworthy of his noble birth." Razis jumped out of a building, fell on the crowd, and ripped out his entrails from his bloody body, praying that God would restore it at the resurrection.
That got me thinking about suicide in the Bible. In II Maccabees, it appears to be a heroic thing. And the same is true in Josephus' Wars 7:389-406, where the Jewish rebels at Masada commit suicide (or, more accurately, kill each other) rather than falling into the hands of the Romans. The assumption may be that no man hates his own body (Ephesians 5:29), so a person is being pretty brave when he takes his life.
But the Bible mostly presents suicide as a bad thing. The characters who do it are not good people: Abimelech the tyrant (Judges 9:54), Saul the maniacal king (I Samuel 31:4), Ahithophel the traitor (II Samuel 17:23), and Judas Iscariot, who betrayed the very Son of God (Matthew 27:5). Abimelech and Saul killed themselves to avoid posthumous shame. Ahithophel's feelings were hurt because Absalom didn't follow his advice. And Judas felt guilty for betraying Jesus, even though Peter also denied Jesus, was forgiven, and become a powerful vessel for God.
Probably the only place where suicide is presented favorably is the story of Samson. Samson prayed, "Let me die with the Philistines," and he killed himself and tons of Philistines by destroying the temple of Dagon (Judges 16:30). But that was an act that helped others. As far as Samson was concerned, he'd might as well die doing something good for his people, rather than spending the rest of his life pushing a treadmill for the Philistines.
But the acts of Razis and the Jewish rebels at Masada don't strike me as overly altruistic. They were seeking to preserve their honor. Granted, the people at Masada didn't want their children to endure slavery at the hands of the Romans, and that may be somewhat altruistic. But I think there's a better way to look at the situation.
My mind turns to the apostle Paul, who didn't care what situation he found himself in. As far as he was concerned, God could use him anywhere. Even when he was in prison, he managed to encourage the church and win people to Christ, including some from Caesar's household (Philippians 4:22). Paul wouldn't commit suicide to avoid suffering or preserve his honor. In his mind, earthly honors were refuse compared to knowing Christ, who loved him in spite of his horrible past; and Paul realized that knowledge of Christ came through suffering (Philippians 3). Paul wouldn't kill himself because he was too noble to fall into the hands of sinners, and he wasn't afraid of slavery at the hands of Gentiles. For Paul, such situations would be opportunities for God to use him--to present Christ to people who otherwise did not know him.