I am so very glad you wrote. It’s been over 5 years — long past time for you to forgive yourself and move on.
I don’t think there is a person in the world who at one time or another did or didn’t do something they regret. Making mistakes is part of how we learn who we are and what we stand for. We often remember such things in order to remind ourselves to not go in that direction again.
In your case, the “reminder” has become a daily poison. It’s as if you don’t quite trust yourself to be the man you want to be. Please take a good look at how you’ve been living these past five years. My guess is that you have reason to feel good about yourself. You left behind a behavior that you didn’t like then and don’t approve of now. That’s something to be very proud of.
I hope you can be proud of the man you’ve become. I doubt very much that you need to keep beating yourself with regret in order to be that guy. If you find that you can’t keep it in perspective, then please fine a counselor who can help you with it.
I wish you well.