The Poison/Burn animation with 0 HP glitch is a natural glitch in Pokémon Red, Green, Blue, and Yellow.
The glitch occurs if a poisoned/burned Pokémon with a small amount of HP is confused, and on the next turn loses all of its HP.
For this Pokémon, its HP will be 0, but before it faints, the message and the animation of the poison/burn will appear, although the Pokémon doesn't have any HP. This also happens with a move which provides recoil damage like Take Down.
This was fixed in Pokémon Gold and Silver.