The first thing you must do when you have made a mistake is to be honest with yourself admit you made a mistake and take full responsibility for it.
The act of taking responsibility will prove to you that you are choosing to make yourself accountable for what you did wrong and not making excuses.
Second, think about why you did what you did and make a promise to yourself that you will do your best not to do the same thing again.
I know that you know how it feels when a friend does something that hurts your feelings.
So, if you hurt someone else, take responsibility for what you did wrong and sincerely apologize for everything you did to hurt them.
The single best way not to hurt someone else is to follow the Golden Rule and, “do unto others as you would have them to do unto you.”