Other than switching, the following moves, items, and conditions can negate the effects of Torment (for a turn, some turns, or permanently):
- Struggle
- Rollout/Ice Ball
- Aroma Veil
- Instruct
- Confusion (status condition) (Emerald)
- Rage (Gen IV)
- Magic Coat (Gen V+)
- Mental Herb (Gen V+)
- Some Z-Moves
- Dynamax
For specifics, please see below.
Struggle is not affected by Torment; if a Pokémon has run out of PP for all of its moves, it can continue to use Struggle.
Moves such as Rollout will still be fully executed under the effects of Torment.
Torment does not work on Pokémon under the protection of Aroma Veil. Torment does not prevent the target from repeating its most recent move via Instruct.
In Pokémon Emerald, if the target hits itself in Confusion, Torment has no effect on which move it can select next.
In Generation IV, due to an oversight, if a tormented Pokémon has used Rage and then selects a different move, it will be freed from the torment, but its rage will still be building.
[Generation V+] Torment can now be reflected with Magic Coat.
[Generation V+] If the holder is infatuated or affected by Taunt, Encore, Torment, Heal Block, or Disable (including from Cursed Body), it consumes the Mental Herb and is cured of all these effects.
A Pokémon affected by Torment can upgrade a status move into a Z-Move even if it used that move during the previous turn.
Torment will fail if used on a Dynamax Pokémon, and a Pokémon under the effect of Torment can remove it by Dynamaxing.
Torment (Bulbapedia)
Mental Herb (Bulbapedia)