Does energy drain count as a death effect?
Energy drain is not a death effect.
The undead type calls out immunities to “death effects” and “energy drain” as separate things.
Death Attacks description in the Core Rulebook doesn’t mention negative levels or energy drain.
“Energy Drain and Negative Levels” is an entirely separate entry in the Core Rulebook and doesn’t say energy drain is a type of death attack, not does it say that death ward protects against them.
Death ward gives a bonus against death spells and magical death effects, and goes on to say that the target is immune to energy drain, and suspends penalties from negative levels while the spell is active.
Therefore the rules treat energy drain and death effects as different things. For example, if you are immune to death effects, you aren’t necessarily immune to energy drain.
This spell functions like enervation, except that the creature struck gains 2d4 temporary negative levels. Twenty-four hours after gaining them, the subject must make a Fortitude saving throw (DC = energy drain spell’s save DC) for each negative level. If the save succeeds, that negative level is removed. If it fails, that negative level becomes permanent.