celebrate, and be gracious about it - lots of people will congratulate you on your new role and will generally laud you for what you've done in your current role. The right response is "thank you" or "I have really enjoyed working here, working with you". Allow yourself to be celebrated, that's important for your colleagues, and good closure for you.
reflect, but let go - we learn something from every experience we have. Moving on from a job is a good time to look back and reflect on what you've learned. While much of what we learn is from positive experiences, some of it is from negative experiences. Sometimes we carry anger and resentment around those negative experiences. This is the time to let go of that resentment, and just keep the lesson.
take care of your staff - losing a manager is a traumatic experience for anyone. People have anxiety about having to build a relationship with a new manager, and at the time that you are leaving, they may not even know who that manager is, so they are likely to be fairly stressed. Tie up all loose ends on personnel issues if possible. Specifically, do evaluations for all your staff. It's not fair to your staff or their new manager to leave them without a current evaluation on file. In general, use the phrase "I'll leave that for the new person" sparingly when it comes to HR issues.
if possible, give things up gradually - I gave six weeks' notice at my current job, and I immediately began withdrawing from projects and responsibilities. As a senior manager, I was engaged in lots of projects and operations, so that length of time felt about right. During those six weeks, I shifted my focus and started to think of myself as being in more of a consulting role than a leadership role. Keep in mind that you will quickly move into a "lame duck" status and taking a consultant approach is a good way to deal with that. Finally, don't stay too long, as a lame duck doesn't get better with age.
give honest but measured feedback to your boss - in every job I've left, my boss has asked me for feedback on them or advice as to what to do going forward. This is not the time to tell your boss all his or her faults! Obviously, there's a little self preservation going on there, after all, that person will be called as a reference for you some day. But on the advice as to what to do going forward, take on that consulting approach. You will have some unique insights that are very valuable to the organization.
stay connected - make sure that your boss, staff and coworkers have contact information for you. Connect on LinkedIn. A former boss or colleague is a wonderful resource for advice and coaching. Make sure your colleagues know you're available to them. I assure you that you will find any coaching or mentoring you do after you leave to be mutually beneficial. Not to mention that this helps you maintain your network, which is hugely important going forward.