To be more precise, the mechanism of the social polarity involves increasing social anxiety transformed into fear. (The current overall social stability and security of the Western world is unparalleled in human history. And yet, social anxiety is the flavor of the modern age.)

Anxiety is a feeling of vague threat and dread. Persistent, embodied anxiety is unbearable. Anxiety therefore needs a target to fear. A fear-target "the Other" outside of the body creates a path for relieving the anxiety.
In creating fear-targets of the "Other" anxious individuals and groups can feel emotionally "courageous" by standing up to Fear and psychically and physically relieve themselves of the anxious mental and bodily sensations. (Kinnamon, M. 2017 The Witness of Religion in an Age of Fear) That's why "courageous" hateful comments targeting the "other side" feel, temporarily, good. These hate-as-courageous acts release endorphins which relieve the body of anxious sensations. They create social bonds with "our side" which also feel good.
But as you note, the persistent anxiety/fear-target/courage as hate acts etc... don't relieve individuals or groups from the existential threat landscape. In fact, they perpetuate a feedback loop increasing all three: anxiety>fear target>courage as hate acts. The only way to feel temporarily better, less anxious? More and bigger (visceral) courage as hate acts...instead of a social media comment as knife, an actual knife, then a gun, then a group with guns, then bombs...etc....

Fasching (Comparative Religious Ethics: A Narrative Approach to Global Ethics, 2011) describes a similar cosmic perspective along similar lines and points to a need for an increased awareness worldviews as a path forward. Knowing the "story we well tell ourselves about the story we're in, and the role we play in it" is likely informed by a religious worldview. Fasching too, notes the shared aspects of existential threat, "decline and death" in all of these inner stories in Islam, Christianity, Jewish, Buddhist and other faiths. And similar remedies core to the major religions of "welcoming of the stranger" - Bible Matthew 25, Qu'ran 93;6-11 - (the Other) and also recognition of the actual existential threats of humanity - nuclear war, pandemics, destruction of the environment etc...