The easy part is deducting lives if level is not completed.
You'd need a global variable for the amount of lives you have and deduct 1 from it if the level is played unsuccesfully.
The harder part is the replenishing part, at least if you want the replenishing to continue if the game is not running. Construct 2 doesn't have a possibility to see how much time has past between close and start. There is a plugin for system time you could use to get just that information.
The replenishing itself could be done with a sytem every x seconds or a timer behaviour adding 1 to the amount of lives after a certain amount of time has past.