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. Your best option in this scenario is to accept it with dignity and make sure you're ready to leave the office for good when you turn in your resignation letter, whether that means gathering up your personal items or making sure you've collected the names and contact information for the teammates and clients you'd like to stay in touch with.