As an ability for a potential PC race:
Option 1: When who have at least 1 hitpoint, and your currents hitpoints are below half of your hitpoint total, you heal your half or your Proficiency bonus rounded up, at the start of your turn. You also gain advantage on death saving throws, and regrow lost limbs after a long rest.
Option 2: When you take a short rest, and spend hit dice to heal, you first heal up to half your hitpoint total before adding the amount healed from your hit dice. You also gain advantage on death saving throws, and regrow lost limbs after a long rest.
Option 3: As a bonus action you can spend 1 hit die to heal damage as if you were when taking a short rest. This hit die spent counts against your total you spend when taking short rests. You also gain advantage on death saving throws, and regrow lost limbs after a long rest.
And some 1d6 unarmed attack that no one really cares about, like a claw or bite as another ability.
For classes, I think that out of the fighting classes Barbarian would be the one that a Troll-themed subclass fits best in. Healing would kick in with rage and it could go beyond 3 hp, maybe something like heal 2d6 hitpoints at the start of your turn.
Less of a fit with spellcasting classes, but I feel something like a Druid, Sorcerer or a Mad Scientist Artificer might have room for a Troll-themed subclass.