St. Peter the Apostle thought the same way, he asked God for forgiveness and he became our first pope.
Dismas, one of the two thieves on the cross, in his last minutes on Earth, asked God for forgiveness and is now Saint Dismas.
Judas Iscariot, one of the twelve 12 apostles chosen from among all of mankind, despaired in the end, hung himself and went to Hell for all eternity.