A dark stage play put on aboard the Enterprise-D in 2369 under Beverly Crusher's direction, with William Riker as a man held in an asylum, which becomes entangled with his real captivity on Tilonus IV.
Frame of Mind is a drama staged by Beverly Crusher's theatre company aboard the Enterprise-D, seen in the sixth-season episode of the same name. Riker takes the lead, a patient in a mental institution who insists he is sane, while Data plays the doctor who questions him.
Riker is uneasy about the part as he rehearses, and after the performance he suddenly finds himself in what appears to be a real asylum, the Tilonus Institute for Mental Disorders, where he is told that the starship is his delusion. He slips back and forth between the ward and the play, unable to tell which is real.
Neither is. Riker has been captured during an undercover mission on Tilonus IV, and his mind has built both settings from his recent memories of the play to resist a neural extraction procedure. Once free, he strikes the set himself.