The Thaw (Star Trek: Voyager, Season 2, Episode 23)
Voyager finds a set of five stasis pods on a deserted planet. Two of the stasis pod occupants are dead; the other three can't be awoken. Kim and Torres go into the two pods and connect themselves to the central computer, where they discover a program has taken the form of a clown and is torturing the remaining three stasis captives in a hologram of their fears. The Doctor has to enter the simulation to try to persuade the program to let its hostages go.
Watch Star Trek: Voyager on CBS All-Access.