The story of Samson is found in the book of Judges in the Bible. This is the story where Delilah (whom he loved) tricked Samson, thereby cutting all his hair off, which supposedly gave Samson his massive strength. Basically, his strength was from the LORD GOD OF HEAVEN when he believed and obeyed Him, when he disobeyed he lost the strength, not just because his hair was cut, but because of pride and disobedience. When he trusted again in the LORD his strength came back one last time............ 'Let me die with the Philistines!' And he pushed with all his might, and the temple fell on the lords and all the people who were in it. So the dead that he killed at his death were more than he had killed in his life. We will see Samson in heaven even though he lived a carnal life, he was still a believer. We can learn from his mistakes, but we can also learn from his faith in God.
A good example of someone in the Bible who realized his sin was Jonah. As per the bible, he was swallowed by an outsized fish that was particularly prepared by God. Jonah spend 3 days and 3 nights after being swallowed.