So yeah, the episode is Star Trek does It's A Wonderful Life, but the original plan was to do A Chritmas Carol (working title for the episode: A Q Carol), in which Q brings Picard through three prominent events from his life, including being stabbed here, and the events leading up to Jack Crusher's death. Michael Piller wasn't happy with the idea, so Ron Moore decided to focus on the stabbing, which was the idea with interested him the most.
None of the writers could remember who came up with the idea that kicks off the episode - of Picard dying, seeing a white space and Q is there - until they got a letter after the episode aired. Turns out the idea came from a spec script, and the writer wasn't credited for the episode (Ron Moore is the only credited writer), but he was happy when the staff reached out to him, acknowledged his contribution and Paramount paid him. Jeri Taylor noted that the acknowledgement was far more important to him than the payment, and he was very pleased with how the TNG crew dealt with the situation.
The morning-after scene with Marta and Picard had content cut after filming, though JC Brandees (who played Marta) was pleased with this as she felt the dialogue made her out to be more self-pitying and didn't fit the character. The script can be found here, and the scene is a special feature on the Blu-rays for series 6
One thing that did change from early drafts of the script was that the alternate timeline Enterprise's commander would be Edward Jellico.
Some references: The Bonestell facility was named after matte painter Chesley Bonestell; The Nausicaans are named after the Hayao Miyazaki manga and anime Nausicaa of the Valley of the Wind. Ironically, Patrick Stewart was in the cast of the 2005 dub of Nausicaa.
Picard's stabbing was first mentioned in the series 2 episode Samaritan Snare, though there the way he describes it infers that the fight took place during an initial encounter rather than a later meeting with the same group.
The DS9 episode Q-Less aired the prior week, ending with Q stating that perhaps he should give Picard a visit.
Picard is depicted as having hair while a young ensign in the episode, but in a photo in Star Trek Nemesis, he'd be shown as bald while still a cadet.
Peter David refers to this episode in two of his Q-centric Trek novels.
This is one of only five episodes of TNG that doesn't have a stardate.
This episode is wildly popular with critics and fans. It's number 4 in Entertianment Weekly's top 10 TNG episodes (compiled for the show's 20th anniversary), and was one of the ten essential episodes in the book Star Trek 101.
John DeLancie called out the script for specific praise, especially his speech towards the end, and Wil Wheaton says it's his favourite episode of TNG, because it shows that the shitty things in life are important to who you are.
Michael Piller however never warmed to it. While he liked the basic premise of Picard dying and finding Q in the afterlife, he didn't like the idea of doing an It's a Wonderful Life episode, saying it's something that shows do when they run out of ideas. Ron Moore noted that Piller gave him the freedom to do the episode the way he wanted even though he didn't like it, and Moore appreciated that greatly.
This was an episode I loved when it first aired, but my memory largely stuck on the funny bits - I was always more of a fan of funny Q than jerkhole Q, so flowers for "John-Luck Pickerd" and Picard waking up next to Q were my brain highlights. And watching it again it strikes me how much more of the episode is about the drama, and about Picard's self-discovery.
And as an adult pushing 40, it's definitely more interesting to me now than the funny bits. Picard's brash, womanising, scrappy ensign is part of the austere diplomat of the present, no matter how buried away it is. While contemporary Picard and flashback Corey fall out, the pair remain friends for many years as they age together. And that's the core of the episode. As I noted above, Wil Wheaton said that this episode is about how the shitty things and the changes you don't like are just as important as the good things and the changes you do like .
Like many of the TNG episodes we've talked about, I feel there are pacing issues here. Picard spends more time in the past, of course, but we have to get enough of the alternate present to give us Picard's remorse at the changes to his life, and that means that as usual, the conclusion is given short shrift. Q just gives Picard his life back, done and dusted. Which leads me neatly to my next point...
Q is a very interesting character in terms of his personality and his actions. He first shows up as a pure antagonist, but by his third appearance he wasn't a menace any more, he's a point of comedy. When the contiunuum stripped him of his powers, he asked to be sent to Picard to live out his newly mortal life. By this point, he considers Picard a friend, maybe his best friend? Two out of Q's next three appearances are in that friendly mold - the Robin Hood episode and this one. The other one is when he's on a mission from the continuum and so can't fuck around. With the idea of Q being here as a friend to Picard, that abrupt ending makes sense. It's just that Q's perspective on friendship is messed up.