Eternity of Torture (3.5e Spell)

This spell functions as temporal stasis, warding the creature against any outside influence and putting them into a state of suspended animation. In addition to the normal effects of temporal stasis, the target is rendered invisible. Inside the ward, however, the victim immediately drops to 0 hit points and is automatically stabilized as long as the spell remains active, creating an existence of constant agony. For each day that the creature is left under the effect of this spell, they must make a Will save to resist going permanently insane (as the insanity spell).

Nothing short of a freedom, wish, or miracle will end the stasis effect, but doing so also ends the stabilization effect and causes the target to begin dying. Reversing that effect also does not negate the insanity, which must be remedied separately through greater restoration or another wish or miracle.