Not knowing what it is you did makes context difficult. Never mind.
Things to consider.
It take two to tango, so whatever you did, it's entirely likely that the other person or people involved bear some responsibility. Don't you dare take it all on yourself!
Also, your perception of the gravity of what you did will almost certainly be coloured by the reactions of the other party(ies). Try to look at your actions objectively. They may not in fact be as bad as you feel they are, or as others are making you feel they are!
Finally, it's up to you whether or not you embrace your dark side. I did, long ago. I no longer call or think of myself a a good person. If the necessity arises, I can be a real bastard, and that without a qualm. But I always reserve such behaviour for those who deserve it. So look again at what happened in the cold light of day. Maybe your instincts were right originally?
To accept ourselves, all of ourselves, without fear or pretence, is the beginning of peace.