There is a bigger mechanism at work where negativity affects your overall health, which in turn can affect your brain again (humans are full of these kind of feedback systems).
If you constantly experience negative emotions you will be subjected to stress and more sensitive to stressful situations. Being positive is the best defense against stress, after all.
If you experience stress, you release cortisol, the main stress hormone. Cortisol has a variety of effects, including on the immune system.
Negativity and the stress that accompanies it have also been seen affecting certain stem cells that cause changes in the brain, but surprisingly, it strengthens certain connections and facilitates the fight-or-flight mechanism, Sure, you need that, but too much of it will just get in the way. It increases the risk for mental illnesses like anxiety and depression.
So, everything is fine in the right dosages; a little bit will even help you. Too much or too long, on the other hand, often leads to the exact opposite effect.