Long-term relationships are almost always more important than short-term problems. Remain calm and detached. Allow others to rage while you consider the appropriate response. Should you reason, agree, apologize, fight or leave? Which is to your benefit and to the benefit of those you must protect?
The town's building inspector may be a jerk, but you still have to stay on his good side. You will never rehire the electrician but, right now, you may need him to finish the current job.
Defensively, arguing often makes the other party more stubborn and determined to prevail. Let go of your anger. It only clouds the issue and draws you into a quick response. Whenever possible, use kindness as your weapon against evil. Neutralize shouting with soft words. Answer threats with serene confidence. Speak plainly. Don't use foul language or sarcasm. Breathe deeply with long exhalations. Let the anger wash over you. Don't exaggerate. Don't lie. Attack the argument and not the person.
Offensively, stand tall with confidence and do what needs to be done which may be nothing or everything. Wise men don't fight with each other.