Worf did resign in 'Redemption' and threatened to do the same in DS9 'Way of the Warrior'.
Aside from Data threatenin' to resign in 'The Measure of a Man' and Sisko thinkin' about it in DS9 'Emissary', I can't think of any other time it happened.
Tom Paris leavin' the crew durin' the second season of VOY doesn't count, either, since he was still actin' under Janeway's orders.
As someone said, Dr Crusher did resign in Sub Rosa, and adamantly insists she has every right to leave the ship when Picard tries to stop her.
If it counts, Wesley resigns, again by putting his badge down in "Journeys End"