The apostle Paul was forgiven of much of the same, (and more even), but "how" or "why", or on "what basis" or how was the apostle Paul, or formerly back then Saul, forgiven...?
Did he say, "he" had to "obtain and earn it" or anything, through much toil, strife, difficulty, or by his own work or self-efforts, for himself, or whatever...? Or was he "trying" to "obtain or attain or earn" "it" or anything, by himself, or even for himself, by himself, at all or anything...?
Wonderfully the full answer is deep and good and heals those that hear:
1 As for you, you were dead in your transgressions and sins,
2 in which you used to live when you followed the ways of this world and of the ruler of the kingdom of the air, the spirit who is now at work in those who are disobedient.
3 All of us also lived among them at one time, gratifying the cravings of our flesh
a and following its desires and thoughts. Like the rest, we were by nature deserving of wrath.
4 But because of his great love for us, God, who is rich in mercy,
5 made us alive with Christ even when we were dead in transgressions—it is by grace you have been saved.
6 And God raised us up with Christ and seated us with him in the heavenly realms in Christ Jesus,
7 in order that in the coming ages he might show the incomparable riches of his grace, expressed in his kindness to us in Christ Jesus.
8 For it is by grace you have been saved, through faith—and this is not from yourselves, it is the gift of God—
9 not by works, so that no one can boast.
10 For we are God’s handiwork, created in Christ Jesus to do good works, which God prepared in advance for us to do."
Ephesians 2 NIV
10 I want to know Christ—yes, to know the power of his resurrection and participation in his sufferings, becoming like him in his death,
11 and so, somehow, attaining to the resurrection from the dead.
12 Not that I have already obtained all this, or have already arrived at my goal, but I press on to take hold of that for which Christ Jesus took hold of me.
13 Brothers and sisters, I do not consider myself yet to have taken hold of it. But one thing I do: Forgetting what is behind and straining toward what is ahead,
14 I press on toward the goal to win the prize for which God has called me heavenward in Christ Jesus."
Philippians 3 NIV
5Those who live according to the flesh have their minds set on what the flesh desires; but those who live in accordance with the Spirit have their minds set on what the Spirit desires.
6The mind governed by the flesh is death, but the mind governed by the Spirit is life and peace.
7The mind governed by the flesh is hostile to God; it does not submit to God’s law, nor can it do so.
8Those who are in the realm of the flesh cannot please God.
9You, however, are not in the realm of the flesh but are in the realm of the Spirit, if indeed the Spirit of God lives in you. And if anyone does not have the Spirit of Christ, they do not belong to Christ.
10But if Christ is in you, then even though your body is subject to death because of sin, the Spirit gives life
d because of righteousness.
11And if the Spirit of him who raised Jesus from the dead is living in you, he who raised Christ from the dead will also give life to your mortal bodies because of his Spirit who lives in you.
12Therefore, brothers and sisters, we have an obligation—but it is not to the flesh, to live according to it.
13For if you live according to the flesh, you will die; but if by the Spirit you put to death the misdeeds of the body, you will live."
Romans 8 NIV
8 Let no debt remain outstanding, except the continuing debt to love one another, for whoever loves others has fulfilled the law.
9 The commandments, “You shall not commit adultery,” “You shall not murder,” “You shall not steal,” “You shall not covet,” and whatever other command there may be, are summed up in this one command: “Love your neighbor as yourself.”
10 Love does no harm to a neighbor. Therefore love is the fulfillment of the law."
Romans 13 NIV
And continuing in like manner -- we must put the flesh to death, and walk in the spirit, and Love One Another -- such as in
Galatians 5 NIV starting at verse 13 and into chapter 6.
It's just like John chapter 15 -- we can only bear fruit by remaining in Christ -- walking in the Spirit, looking to Him, keeping His words in our heart, staying focused on Him. Praying as He said to pray (Matthew chapter 6) will help immensely to people like you and me.
When we stumble, as we often do, we confess and in His amazing grace He is faithful and just to forgive and cleanse us -- 1rst John chapter 1. As Paul wrote, we must "run the race" to the end. As Christ said, we must "hear and do" His words, so that we can endure, and if we do not do as He said, He tells us we will be destroyed (John 15 and Matthew 7), but if we confess (1rst John chapter 1) we are restored! Hallelujah.