Guilt has a purpose. A little bit of guilt is good. It does not allow you to get into a cycle of actions that are not good for you and for others.
When such an action happens, the guilt in you acts like a brake for you not to continue with the act. However, guilt is good in the right amount and only for that period of that time. If it goes beyond a limit, it eats you like a termite. If you are stuck in guilt, your mind cannot blossom; you cannot rise above.
So, you need 'skill' to get out of your guilt. But at the same time, not totally remove it from the system till you realise that you are not the doer but the total light, the wisdom, the self. Until that blossoming, a little bit of guilt serves you.
To bring about that balance, we have spiritual practices, surrendering to the divine, and faith in the higher power and self. Go into the soul, "Satchidananda"- true, blissful, the consciousness.
Let go of the event which has gone and left its shadow in the consciousness but take this sankalpa (resolution) that you will not do this action in the future.
Your very wish to repent has solved the purpose. This wish is an indication that your intellect is getting matured. Otherwise, you would not have been aware of your wrong actions.
You are innocent in the present moment. That person who did a mistake has packed off his suitcase and gone. Now inside you is a new person.
Start believing in the innocence of the present moment where the YOU in you is innocent.
Lord Krishna tells Arjuna, "I will relieve you from your sins. You just surrender. Then it's my responsibility to take care of your sins. Don't worry. Drop all that you are holding onto. Drop even your dharma."
Instead, people try to get rid of their sins. The Divine will relieve you of your sins. All that you need to do is to let go of everything you are holding on to.