I just find not getting dragged into flame wars (too often), and sitting on the sidelines being amused by how highly charged people get over what are ultimately non-issues, or futile arguments, to be a far less personally irksome way to "deal" with flamers and trolls.
Or if I do feel compelled to respond I usually try to make light of the situation.
I don't always manage to keep the discipline, but I do so enough so as not to get annoyed by peoples' behaviour. At least I've managed to stay free from any bannings in my time here, even while engaging in a few robust discussions. So my approach seems to have worked for me so far.
“The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.” - Bertrand Russell
"When the power of love overcomes the love of power, the world will know peace."
Jimi Hendrix