Suppose it is a battle between a grass type with a -20 water resistance who already has 1 damage counter. The other Pokemon is a water type Pokemon who has a water move with 10 base power. If the Water Pokemon uses the move with 10 base power would the -20 resistance make it -10 thus taking away a damage counter? Or would the move simply do nothing?
When you have a situation like this, the damage goes to zero. It won't heal you. To try and imagine it, if you resist fighting, and I punch you in the face, it's not going to heal you, it just won't do anything.