It's possible to make a miner not drop their pick in a fight by seamlessly transitioning them from miner to soldier, but it's quite fiddly and requires you to be 'present'.
1. Dwarf is assigned the Miner skill. They are wearing their player-invisible mining uniform, which consists of, let's say, a -copper pick-. The -copper pick- is currently claimed by the miner uniform of that dwarf.
2. Dwarf meets target. Player notices, and pauses the game
3. Player removes Mining job from dwarf. -Copper pick- is currently unclaimed by a uniform and available for general use.
4. Player goes into military screen and finds the uniform settings for the dwarf (if dwarf is not in a squad, make it so). Dwarf's uniform is set to be the -copper pick- available for general use, ie. the pick that they are currently holding. Note: It is the single individual -copper pick-, not a copper pick in general.
5. Player unpauses.
6. Ideally, the dwarf processes the current uniform orders and realises that their uniform requirements are satisfied by the held item. If not, they might drop their mining pick and generate a Pickup Equipment job for the item they just threw at their feet. I don't know if it's possible for them to get interrupted in that short time.
7. Dwarf is no longer 'a miner', and is now 'an inactive military dwarf holding a pick'. Dwarf may be commanded to attack.
It might be possible to skip the unpause and send the kill order right after you assign the -copper pick- to the military uniform, but if the dwarf processes the changes in the order 'drop mining pick -> attack -> get military pick' then you might as well have not bothered.