When you realize you’ve made a mistake, do not blame yourself… just take a good hard & honest look at your beliefs around the situation. Do this in meditation - a perfect distraction-free place to delve into your beliefs. Once you know what you believe, you can work on changing that belief. Remind yourself that any & all hurtful actions toward others or yourself are rooted in bad beliefs & experiences. No negative behavior can possibly come from a place of love, only from a place of deep pain.So try to sow the seeds of positive , loving and Altruistic beliefs..