Prepare for It. In this case, all you can do is politely deliver your resignation, then strive to make the transition as easy as possible for your team. Your manager may not have the ideal reaction to your news__and your workplace may not be the most pleasant environment for the next two weeks__but to avoid burning bridges, it's best to work through it with a positive attitude.
On the flip side, if you loved your job, your coworkers, your boss, the cappuccino machine, everything about the place, don't write page upon page waxing rhapsodic about all that you're giving up by leaving. A brief, heartfelt compliment to the company, or a thank you, is fine.