I was thinking of a trigger that needs a switch and like this...
It can be turned on and off.
When it's on, any man that is commanded by me has below X% of Hit points.
And, you have accumulated X amount of minerals.
Then the system will auto heals for your man.
When it's off, it does nothing.
Just needs a switch that turns on and off...
I don't think it's possible...but when there is a idea...there is a way, lols...
Unless you do virtual HP, there is no way to do that. You cannot detect percentages of HP. But try haveing a burrowed ling teleporting to an invincible hero (Center location on hero, move ling)... they attack the ling, not the hero, have several of them (Create once the ling dies) and it's like an HP system.
The only downside to this that I can think of right now is that your hero is slow moving...