Sometimes you can never really get over regret. The best thing you can do is make amends and apologize in a real and meaningful way to the person(s) you wronged. You can never expect anyone whom you have wronged to forgive you, although most people probably will. But if they don’t, let it go and don’t push them to forgive you. And from this day forward, vow to do better, much better in the future. Live an exemplary life.
In this case, since it was you who hurt yourself (maybe you could elaborate on that a little bit, because it does depend upon what hurt you caused yourself as to how to best deal with it) then try not to beat yourself up about it. If you continue to beat yourself up about it or dwell on it (without fixing any part of the situation that can actually be fixed) then you’ll just sink into a hole of depression. That will benefit no one. The deed has been done. If you feel remorse and you have vowed to not repeat the deed, then move forward. The only thing you can do, is lead a better life from this day forward.
Another thing that you can do is practice the concept of “Paying It Forward.” Do good and kind and useful things for other people, for animals, for your town, for your country, for the environment. It doesn’t have to be related to the thing that you did to yourself. It just makes you a better all around person. Plus it transfers your energy to positive things instead of negative things.