GamePress
Apparently the hp your pokemon lost doesnt matter.
After a trainer battle, even though my pokemon was very low on hp during the battle when i went to heal it using potions, no pokemon appeared so apparently the hp lost during trainer battles does not get saved.