My current, highly effective strategy is this:
1) ask for out-of-cycle, generally Friday afternoon meeting with boss
2) make sad/anxious face as we sit down to meeting
3) say, "I don't know if you can guess why I asked to meet with you today..."
4) let boss say, "Oh, are you quitting?"
5) discuss where I am going, why I am quitting with boss
6) give boss/HR/whoever wants it one-line letter (literally one line) that says, "I am resigning my position as [JOB TITLE] effective [DATE]."
Anticipating quitting is much worse than actually quitting!
Like, keep in mind whether your boss is a crazy person or whether it's standard in your company/industry to be escorted out as soon as you resign, but in general it's not that bad and it's much better to do it in person, as a conversation, rather than being all terse and weird (unless your workplace is seriously dysfunctional).