By working on yourself and being and becoming the person you want to be. By accepting the bad parts of you and not letting them rule you. By doing things that make you proud to be you. By living with integrity. By being kind. By not squandering a second chance.
It takes a long long time. Me, I am still not sure I forgive me. I am not the forgiving type though, lol.
My BH has a different philosophy about this, which is simply that we are human, and we fuck up. He has forgiven me.
Welcome to SI.