You opponent would have to start all over again with that Pokemon. They would have to evolve it from scratch again and apply the energy one at a time all over again. That makes sense enough but the damage doesn't, not to me at least. When it goes back into the hand that heals all. That is how myself and my friends play it.
I really can't fathom the point of the damage. :-/