Go in with a strong energy or fire weapon — those handle the hydra's heads far better than physical damage.
Your aim is to stun each head just before it retreats. Every time you take one down you get a short break, and you should use it: refill your potions or dash to the nearby healing point. Don't push on with an empty inventory, because the later heads hit considerably harder.