He who fights with monsters should be careful lest he thereby becomes a monster. And if thou gaze long into an abyss, the abyss will also gaze into thee. - Nietzsche
Unfortunately, it is largely impossible to fight effectively against evil without some of it rubbing off against you. EG: In fighting WW2 against two of the most EVIL regimes in human history, the Allies committed countless atrocities. This could not have been avoided. There are no "nice" ways to fight wars. Here is an aphorism that I authored:
"In a war, it is NOT the BAD guys fighting against the GOOD guys, rather it is the BAD guys fighting against the WORSE guys."
To fight a war, even in unavoidable self-defense, it is impossible to avoid committing some of the same kinds of acts that provoked the war in the first place. The alternative is national suicide. Ultimately, the instigator is the villain here.
“War is an ugly thing, but not the ugliest of things: the decayed and degraded state of moral and patriotic feeling which thinks nothing worth a war, is worse."