For me it was the discussion that was far more important than a resignation letter. Then again everyone knew I was applying, everyone knew I got in, and then very quickly everyone knew I was leaving during the summer. My supervisor and senior manager wrote my recs so they weren't surprised at all. Both took it extremely well and I continue to keep in touch with both of them.
The letter is just a formality. A sit down discussion with your bosses is much more important. This is one thing I think few employers get upset about, you aren't leaving for a competitor or something. Just talk about how great of a place it was, and you feel this is the best way to take the next step in your career. Even if you hate it, go out the door smiling and dont say negative things to get back. The world is smaller than you realize and you never know who might help or hurt later in your career.
Feedback is often welcome but you want to be fairly pc with your comments, and keep it constructive...none of that, I hate this place everyone is lazy and incompetent, so nothing ever gets done. Instead try I think that improvements to accountability and additional training might increase productivity and overall quality.