I understand how you feel, but we've all been there at some point. It's just a part of maturing and realizing your problems. It's bad to dump your problems on others, but it would not change anything to dwell on the past. Now that you've realized your mistake, I hope you can learn to change and to forgive yourself at some point.
I too, regret having been a terrible friend. I lied to my friends, sometimes for attention, for pity, or the fact that I couldn't pick a side. Nevertheless, they are all selfish reasons. Even though I know it's better to move on, I still sometimes wish I could go back to the past and beat the shit out of myself