Even if you're not close with your boss, chances are you have a working, first_name_basis relationship. Maintaining that in your official letter is okay. You don't need to keep a Victorian level of formality here__just make sure it's a professional tone.
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.