Red Dwarf
Terrorform
S5 E3:
The crew must rescue Rimmer when he becomes a prisoner within his own mind. They use an artificial planetoid made from his subconscious.
Starring
Hattie Hayridge, Sara Stockbridge, Francine Walker