First off, you can't swap while in combat anyway. Second. YOU know how to fight those mobs. YOU have the equipment with you to do so. Why exactly can't you take out your staff and kill those mobs? Taking out an axe/mining pick suddenly gave you amnesia or something?
Look at it vice versa, what's the point of a combat class if it doesn't allow you to kill mobs when they're close to a node you want to mine?