A bad-tempered person's mental reaction is that he should become angry if someone behaves in a manner that is against his will, or if someone insults him. This immediate reaction is accompanied by mental imagery. He has pictures in his mind of how he will react when expressing his anger.
We have to work on ourselves, so that our immediate reaction should be based on both Jewish values and what is sensible in that particular situation. When a person becomes angry, he is likely to react with self-defeating patterns. When you use your intellect to decide on the proper reaction, you will determine the most effective way to behave. The more you think in terms of what is sensible, the more it becomes part of your mental imagery and this will be your immediate reaction in future situations.
(Alai Shur, vol.1, p.144; Rabbi Pliskin's Gateway to Happiness, p.201)