Om Swami
Why do I do wrong things in anger and regret them later?
Wrong actions start as thoughts
Every action begins with a thought, and in tamogun (the mode of darkness and ignorance) there is no gap between thought and action. For the one who has Bhagwan's grace, He sits in the heart so that bad thoughts do not arise, and then the wrong deed does not happen.
Because every action in life always begins with a thought. Often the ignorant person, or one established in tamogun, has no gap between a thought arriving and the action being done.