Judges - Chapter 16
Samson and Delilah
Samson went to Gaza where he saw a prostitute and desired her. The Philistines were told that Samson was in town, so they set an ambush. No problem for Samson! He simply ripped the city gates off the wall and carried them away with him. But here's where the trouble began: Samson was permitted to do some extraordinary things as part of his mission, but this incident was different. Sometimes one has to do an unpleasant task, such as fight a war or execute a criminal. These things should never be considered fun, but rather solemn duties. While Samson may have had lofty goals for his actions, in this case he simultaneously indulged his passions. (Basically, his mission was to attract Philistine attention in Gaza, not to have a good time doing it.)
Then Samson fell in love with a Philistine woman named Delilah. The Philistine leaders bribed her to find out the secret of Samson's great strength. He humored her with a series of lies: tie him up with wet twine, with new ropes, weave his braids on a loom - each of these proved false. Finally he told her that he was a Nazir to G-d from birth and that never shaving his hair was the secret. (She knew that this was the truth since he used the expression "a Nazir to G-d" and he wouldn't use G-d's name in vain.) Delilah shaved Samson's head while he slept, then called the Philistines to arrest him.
The Philistines put out Samson's eyes (this was a Divine punishment for his lusting after the prostitute in Gaza) and put him to work in the prison mill. During this time, his hair started to grow in. Later, during a Philistine celebration, they brought him up to make fun of him. Leaning on pillars, Samson prayed for G-d to return his strength so that he could knock the entire building down, killing everyone in it (himself included!). G-d obliged and Samson killed more of the enemy with his dying act than in his whole career.
The question must be asked how Samson could be permitted to commit suicide. The fact is that knocking down the Philistine temple required Divine assistance; it was not an act that Samson could have accomplished without G-d's help. From the fact that G-d returned Samson's supernatural strength, we see that He agreed that the request was appropriate.