The Ocular Spell Feat changes a spell‘s effect to a ray, thus makes it become a ray spell.
If a ray spell deals damage, you can score a critical hit just as if
it were a weapon. A ray spell threatens a critical hit on a natural
roll of 20 and deals double damage on a successful critical hit.
This damage can be hit point damage, nonlethal damage, ...
You also gain 10 temporary hit points.
If the target has less than 10 hit points, then you gain more temporary hit points than the target has hit points.
The damage dealt and the temporary hit points gained are distinct effects of the sword of life stealing. If they were meant to interact, the sword would say so. As you have observed, the item description ...