Star Trek: The Next Generation, " Birthright"

'''"Birthright." Star Trek: The Next Generation.''' Part I, Week of 22 Feb. 1993. 

The mainplot is Worf's search for his father. In the parallel secondary plot, Mr. Data has something like a machine-caused near-death experience that activates circuits that make even even more human: capable of dreams, visions, and "inspired" art. See below, "Phantasms" episode.