The Potion of Immortality is an artifact in Heroes of Might and Magic IV.
If a hero that drinks this potion, dies during a battle, they gets resurrected but loses all spell effects. The potion of immortality provides only one resurrection, but can be used more than once during a battle. It remains effective until the hero dies, not just for one combat like other potions. This is a limited version of the Guardian Angel spell.
The Potion of Immortality can be used both in combat and on the adventure map.
Potions of immortality were introduced in the game at the last minute to allow spellcasting heroes to live longer. Unfortunately, they introduced some balance issues: might heroes such as barbarians and generals gain a god-like endurance while computer players are not able to use them. The fact that the potion of immortality lasts until the hero dies means that all your active heroes should drink one as soon as they can afford it. Using the potion on the adventure map is recommended; it'll save the turn to drink the potion during the actual combat.
All alignments carry the Potion of Immortality in their town's shop, for 1000 gold. Blacksmiths on the adventure map also sometimes have them.