It is because mental negativity is addictive and feeds on itself.
The Buddha taught that whenever any kind of negativity arises in the mind (anger, hate, jealousy, or sadness in particular), the solution is to observe the physical sensations associated with the emotions and face them.
Physical sensations associated with negative thoughts might be a faster heart beat, harder breathing, blushing, muscle tension, stomach pain or any number of biochemically driven, fight or flight responses. Rather than immediately picking up the bottle, a doughnut, drug, or other mechanism for escape, recognize these signs, and be with them for a moment when they arise. Feel the feeling and know it will pass.
As soon as you start to observe this state of mental impurity objectively, it begins to lose strength and slowly withers away. At first this requires patience, but over time and with meditation practice it happens faster.
But how to observe it objectively? The trick is not to focus on the object or cause of the negativity (be it a person or event). Focusing on the object of the negativity will cause the negativity to multiply and build strength. Once you know what the cause is and have learned from it, dismiss the cause and focus on the sensations. Realize it is in the past and you are in the present. See how these thoughts are harming you and allow yourself to let go of them.
This allows the mind to break the biochemical cycle of anger, and disrupt the root cause of misery and be happy once again.
Just one of the many, many gems of wisdom I’ve taken away from S.N. Goenka’s Dhamma Meditation training through his famous 10-day retreats which I attended two years ago this month. One important fact about these meditation courses which I like is they are non-sectarian in nature. While it stems from the teachings of Buddha and how he reached enlightenment 2500 years ago, it is not about selling Buddhism, or classes. They teach a universal meditation technique with the goal of greater mental focus, gratitude, and happiness in daily life.
Just as a rocky mountain is not moved by storms,
so sights, sounds, tastes, smells, contacts and ideas,
whether desirable or undesirable,
will never stir one of steady nature,
whose mind is firm and free,
who sees how all things pass.
– Anguttara Nikaya 6.55