Half of the battle is to recognize the challenge and want to change. So good for you on that.
Aside from that it is really important to be conscious about your mind, and impulses. You need to regognize patterns and impulses and have restraint against acting on impulse. Reprogramming your mind...