Use the toughness of the creature as the last ability resolves to determine how much life you gain. If the Elf is no longer on the battlefield at that time, use its toughness from when it was last on the battlefield.