I play Ad Nauseam and Phyrexian Unlife at the same time with Ad Nauseam on top. Upon resolution I repeat Ad Nauseam's effect, say, 40 times. Do I lose before Unlife can save me? Or does the game proceed with me at -20 LP?
In this scenario, you would lose as soon as Ad Nauseam finishes resolving. It doesn't matter if you're about to cast Phyrexian Unlife or if Phyrexian Unlife is on the stack waiting to resolve. However, you can easily avoid this problem by simply letting Phyrexian Unlife resolve before you cast Ad Nauseam.
Losing due to having zero life is an example of what are called State-based actions. These are checked at any time that any player would receive priority and they cannot be responded to.
The rules for which player gains priority at what time are defined in rule 116.3:
116.3. Which player has priority is determined by the following rules:
116.3a The active player receives priority at the beginning of most steps and phases, after any turn-based actions (such as drawing a card during the draw step; see rule 703) have been dealt with and abilities that trigger at the beginning of that phase or step have been put on the stack. No player receives priority during the untap step. Players usually don’t get priority during the cleanup step (see rule 514.3).
116.3b The active player receives priority after a spell or ability (other than a mana ability) resolves.
116.3c If a player has priority when he or she casts a spell, activates an ability, or takes a special action, that player receives priority afterward.
116.3d If a player has priority and chooses not to take any actions, that player passes. If any mana is in that player’s mana pool, he or she announces what mana is there. Then the next player in turn order receives priority.
As you can see, a player will gain priority as soon as Ad Nauseum resolves, and at that time state-based actions will be checked and you will lose the game.