Shades of Gray
During a routine geological survey on Surata IV, Commander Riker's thigh is pierced by a small thorn, which causes him to lose the feeling in his leg. After beaming Riker back aboard the U.S.S. Enterprise, Dr. Pulaski determines that the thorn contains an unknown organism which is rapidly spreading throughout his nervous system. If left unchecked, the microbe will soon reach Riker's brain and kill him. Ironically, Pulaski has no way of decimating the organism without destroying the nerves of the being it's inhabiting.
At first, Riker's affliction seems more of a nuisance than a threat. But during a visit with Counselor Troi, his vital signs suddenly plummet and Riker loses consciousness. Although Dr. Pulaski is able to stabilize his condition, she discovers that the organism has spread to Riker's brain. In a desperate attempt to keep his brain functioning, Pulaski begins electronically stimulating his memory.
Soon, Riker's mind is filled with remembrances of his experiences aboard the U.S.S. Enterprise. When a memory involving romance increases the growth rate of the organism, Pulaski surmises that if positive emotions feed the invader, negative emotions could kill it.
In an attempt to recall painful moments in Riker's past, Pulaski induces memories of Tasha Yar's death, which successfully slows the organism's growth, but only temporarily. Moments later, his vital signs plunge again.
Sensing that further stimulation of negative emotions will either kill Riker or cure him, Pulaski induces the commander's most primitive memories of survival. As his recollections grow more violent, Riker's body is wracked by a massive convulsion. Just when it appears that Pulaski will lose him, Riker's vital signs stabilize and the organism vanishes, just as quickly and mysteriously as it appeared.