Sorry if this has been suggested, I've looked around but only found a 3-year old thread with one reply.
A good idea would be to to recruit your armed citizens into an ad-hoc militia, so that if you were really desperate you could gather together all your pick-armed miner dorfs and have them fight the foe.
You could recruit your dwarves into citizen militia squads. Their standard behaviour would be to carry on with their normal day-to-day activities until the squad is activated, at which point you could control them like squads of soldiers. The main difference between them and soldiers is they will not head to the barracks to train. In fact they wouldn't do anything soldierly except be capable of heading into combat (if you are desperate enought to deploy them).
It's for those situations when your soldiers have been killed (or you don't have any), the goblins have breached the fort and you need to mount a counter-attack before things get out of hand and your important dorfs get massacred. It would be convenient to just hit the military screen, activate your militia squad containing your miners and wood cutters and have them attempt to kill the invaders with a couple of commands. The idea would be fairly straightforward in my mind, it's an effort to save hassle organizing your civilians for combat, but really hoping it doesn't come to that so their options should be limited. Basically "grab whatever you can and get ready to fight for your lives, like right now!"
Equipment:
*The dwarves could either show up with only what they have to hand, representing them not having the time or expertise to properly kit themselves out en masse in the event of a raid, and the ad-hoc nature of their organization.
*Or they could pick up equipment from the stockpile (perhaps a stockpile designated as an "armoury" for the militia) and put the equipment back once they are finished and return to their civilian duties. I prefer the previous option.
Training:
*You could have them train for a short period once every now and then, which would be realistic, but I don't prefer this option since I don't want my civilians wasting their time training.
*An idea I like better would be that you could add a single "sergeant" to the squad who will be a soldier and the only member of the squad to engage in training at the barracks. He will act as the leadership figure organizing and leading the rabble. All of the militia members will have to rally to the sergeant before you can do anything with them and his loss will be a major morale blow, possibly dispersing the squad entirely.