Samson was a martyr whose last act brought death both to himself and to the Baal-worshipping Philistines. Samson’s life had become miserable and hopeless. He had lost his eyesight, his freedom, his strength and his family and friends. All he had left as he spent his life grinding in the Philistine’s mill, was his faith in God. It was this faith that led Samson to plead for God’s help to be avenged on the Philistines for the loss of his eyes.
Before Samson’s birth, the angel of the Lord said to Samson’s mother:
Judges 13:5 “you shall conceive and bear a son. . . . he shall begin to save Israel from the hand of the Philistines.”
With the destruction of the pagan temple, Samson’s work of beginning to save Israel from the hand of the Philistines was done. The temple’s destruction was a partnership between God and Samson. God enabled Samson to push down the pillars that the temple rested on, thus destroying God’s enemies and temporarily ending Samson’s life.
In a way, it was God who ended Samson’s life, as the strength came from God. The faith that enabled him to destroy the Philistines and their temple, will also result in his resurrection at the return of Jesus. See Hebrews 11:
Hebrews 11:32 And what more shall I say? For time would fail me to tell of Gideon, Barak, Samson, Jephthah, of David and Samuel and the prophets—
Heb 11:39-40 And all these, though commended through their faith, did not receive what was promised, (40) since God had provided something better for us, that apart from us they should not be made perfect.