I just had a similar problem except I wasn't trying to kill the fort. I had 50 dwarves with running smoothly. Then three goblin pikemen somehow managed to get into the fort past the wall and closed drawbridge and proceeded to kill 44 of my dwarves. I had no military but a ton of traps that they somehow bypassed. Five dwarves got injured and went and lay down in the hospital but the miner only had a couple bruises. So the miner threw a tantrum and decided he needed to go drink. (Which to be honest is perfectly dwarfly and reasonable.) Fortunately (or not) I had a huge supply of food and booze, so he sat around doing nothing much but drinking, eating, tantrumming and and feeding and bringing water to the injured dwarves. There were still three goblin pikemen running around the fort, but they had been significantly injured by the miner, so they wouldn't go near him anymore. And he couldn't finish them off because he was too busy throwing tantrums when he wasn't drinking or having them run away faster than he could catch up to them.
So I had five useless dwarves in the hospital not dying because my miner kept taking care of them, a miner who just sat around drinking and taking care of the injured dwarves, goblins who were too afraid to finish them off and a siege sitting outside the front gate killing off new migrants (who couldn't get in past the closed gate anyway) that I couldn't let in to finish things off because the miner refused to open the gate. And the caravan had just left, so I couldn't even expect caravan guards to come in and break things up any time soon.
After a season of this waiting for someone to do something I finally abandoned and savescummed back to the previous season's save and pretended it had never happened.