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.
The Hand_off. Finally, state your willingness to help out with the transition. You don't need to go into great detail (and definitely don't promise anything you can't deliver), but a couple of lines stating that you'll ensure a smooth wrap_up of your duties will show that you're in the game until the very end. Obviously, feel free to adjust this a bit based on your experience and your company culture, then submit it via the typical procedures at your company.