Frame of Mind (Star Trek: The Next Generation)

"Frame of Mind" is the 147th episode of the American science fiction television series Star Trek: The Next Generation, and the 21st episode of the sixth season. Written by Brannon Braga and directed by James L. Conway, it first aired on May 3, 1993, and focuses on First Officer Riker as he grapples with conflicting realities. The episode incorporates elements of the Tom Stoppard play Every Good Boy Deserves Favour, which had recently been performed by members of the cast.

Plot
Set in the 24th century, the series follows the adventures of the Starfleet crew of the Federation starship Enterprise-D. During a dry run for a covert mission, Riker is accidentally injured by Lt. Worf, and while Dr. Crusher heals the head wound, some pain persists. He then performs in "Frame of Mind", a play in which his character is confined to a mental asylum, and delivers a soliloquy regarding the nature of being sane. At the play's conclusion, one officer frowns, ignoring the ovation the audience delivers. As Riker straightens from a bow, he is alone, trapped in a cell similar to the set. As he is locked in the cell, Riker hears an alien humanoid doctor deliver a line from the play.

In the asylum cafeteria, Riker becomes agitated when he is reminded that he killed a man, prompting doctors to sedate him. Awakening on the Enterprise, Riker flees from an alien doctor only to find himself back in the asylum cell, where medics use holographic projections of the Enterprise to convince him that the asylum is the true reality. This succeeds in convincing Riker to ignore what he believes is a hallucination of Dr. Crusher, who tries to alert him to an impending rescue attempt, which succeeds in returning him to the Enterprise - which Riker remains convinced is an hallucination. To prove this, he fires a phaser at himself, revealing that he remains in the asylum cell. In a bid to destroy the cell he sets the weapon to overload, and after it detonates, finds finds himself back on the theatre stage taking an ovation. Refusing to accept this as real, Riker pounds on the wall of the set, shattering that reality.

Finally coming to on an operating table, with a device inserted into his head where he has been experiencing pain, Riker struggles free and uses his communication badge to request an immediate beam-out. Back aboard the Enterprise, Dr. Crusher tends to his wounds, and Riker learns that he had been taken prisoner on the covert mission. The strange experiences had been prompted by his resistance to efforts to scan his brain to discover strategic information about the Federation. Riker returns to the set of the play one last time to dismantle it.

Production
The story was written by Brannon Braga and directed by James L. Conway, and it is focused on some experiences of First Officer Riker. Braga's initial idea for the story was: "What if Riker wakes up in an insane asylum?" Conway had previously directed TNG episodes "Justice" and "The Neutral Zone" in season one.

The show guest stars Susanna Thompson as Jaya, her second appearance on The Next Generation. Thompson would later return in the Deep Space Nine episode "Rejoined", and as the Borg Queen in several episodes of  Star Trek: Voyager. David Selburg, Andrew Prine and Gary Werntz also guest star.

Cultural references
The website Women at Warp compares the "none of this is real" theme with the Buffy the Vampire Slayer episode "Normal Again." "One of the series' most controversial episodes, "Normal Again" finds Buffy shifting between two worlds: one where her friends and monsters she's battled are real, and one where doctors in a mental health facility try to convince her that those same friends and monsters are actually figments of her imagination.

Reception
In 2001, The A.V. Club rated this episode an "A−" and said it was actor Jonathan Frakes' best performance so far in the series.

In 2012, Keith DeCandido of Tor.com gave the episode a rating of nine out of ten.

In 2016, The Hollywood Reporter rated "Frame of Mind" the 68th best episode of all Star Trek episodes and the 16th best episode of Star Trek: The Next Generation, and again in May 2019 they ranked it as one of the top 25 episodes of this show, describing it as a "dark and ambitious" episode with a script that played with the audience's sense of reality.

Wired ranked "Frame of Mind" as one of the best episodes of Star Trek: The Next Generation in a 2012 review, and quoted writer Ronald D. Moore: "I thought it was interesting how 'Frame of Mind' used a play as a bridge to drive Riker between reality and madness," Moore said.

In 2017, Heroes & Icons listed this episode as one of 18 Star Trek episodes featuring scary or eerie content.

In 2017, Den of Geek ranked this episode as one of the top 25 "must watch" episodes of Star Trek: The Next Generation.

In 2018, The Gamer ranked this as the 20th creepiest episode of all Star Trek, noting how the audience is not sure what is real and calling it "uncomfortable".

In 2019, The Hollywood Reporter listed this among the 25 best episodes of Star Trek: The Next Generation.

In 2020, Den of Geek ranked "Frame of Mind" as the fourth most scary episode of all Star Trek franchise television episodes.

In 2021, Screen Rant ranked it the second scariest episode of all Star Trek franchise episodes. They praised actor Jonathan Frakes performance and a high-quality story.

Releases
The episode was released as part of the Star Trek: The Next Generation season six DVD box set in the United States on December 3, 2002. A remastered HD version was released on Blu-ray on June 24, 2014.

On November 3, 1999, this was released on LaserDisc in the United States, paired with "Suspicions". The two episodes together had a runtime of 93 minutes, and it had a Dolby Surround audio track.