I suggest using Spurn Orbs or Petrify Orbs. Spurn Orbs warp all enemies in the room to a random spot on the dungeon. Petrify orbs petrify all enemies in the room. These are good for escaping and making it easier to hit enemies. It also allows you to fight enemies one or two at a time. If you are unable to get these items, a move that hits all enemies (i.e. Vacuum Wave, Heat Wave, etc.) is just a viable in some cases.
Credit to Trachy: Discharge is a very good move for these sort of situations, since it paralyzes a good number of the Pokemon in the room, meaning you don't get swarmed easily.
Credit to Proffessor Epic: I'd also recommend growl if you happen to have it still, or something like that, lowering the stats of the entire room at once.