Staying collected, sticking to your guns, and not allowing yourself to dip to the irrational person's level is the best way to deal with someone who won't listen to reason, or rejects your arguments out of hand. Staying cool and knowing when to fold are the important parts though. Your debate may not be as satisfying as you wish, but you'll at least be able to leave the tense situation and calm down knowing you were right, you behaved intelligently, stayed coherent, and left the door open. That's a win in anyone's book. Good luck!