Prepare for It. The best way to prepare for this reaction is to simply know your stance ahead of time by determining if you would even consider a counteroffer. Yes, it may be more money or a better title, but there's more to consider__including your career goals, level of job satisfaction in your current role, and the opportunities that your new role offers.
A Gracious Tone. Your resignation letter is not the time to air grudges, take passive_aggressive shots, or otherwise be unpleasant. Regardless of how you feel about your (soon to be former) job or your boss, this letter should be an exercise in professionalism and graciousness. An excellent way to do that is to say a simple "thank you." Even if you hated your job, you got something from it at some point. Focus on that positive bit if you need to.