Are they giant badgers or just badgers? If they are just normal badgers, my advice is NOT to attack them at all, and remove your dwarves from active duty - civilian dwarves are (at leas in vanilla) quite capable of outrunning a badger until it stops raging.
If you have giant badgers on the other hand, then you have some serious problems, and need some military intervention. You need to:
- go to the military screen (m) and create a squad - 'metal armor' is a good* default uniform to use
- put the dwarves you want in the squad - if possible choose dwarves who "[have] a sense of duty" since they are more likely to respond to training/orders
- go to the alerts (a) submenu and change your new squad from inactive to active
- exit the military screen, and set up a weapon rack as a room (r), and tell your squad to train there (t)
- wait for your dwarves to pick up their gear, and assemble for training in the new barracks
- enter the squad menu (s) select the first squad (a) and move them to the location where you want them to fight (m)
* With the metal armor uniform, dwarves will just grab whatever weapons or armor they think is "best" according to personal preference and item value. If you want them wearing something specific, you'll either need to mess around with uniforms or their individual item assignments, which can end up a nightmare of micromanagement, but results in your dwarves doing pretty much exactly what you want them to.