I'd rule it'd only heal x2 the HP you have left.
In the spell's description, it states:
You sacrifice some of your health to mend another creature’s injuries.
You take 4d8 necrotic damage, which can’t be reduced in any way, and
one creature of your choice that you can see within range regains a
number of hit points equal to twice the necrotic damage you take.
In your example, you only "take" 5 HP of damage before you become unconscious and have to start making death saving throws, etc.
I fully admit it's well open to interpretation of what constitutes "taken damage" but this seems to be a tit-for-tat exchange of HP ("transference" is right in the spell name) and allowing for HP being transferred when the caster is below zero is effectively transferring HP from nothing.
[addendum] - It is worth noting that nothing in my interpretation of the rules precludes dropping you down to zero HP, with the resultant death saving throws being required afterwards.