Star Trek: Next Generation, S3E3: ‘The Survivors’. Directed by Les Landau. 1989.
On the surface of Delta Rana IV, the away team finds a small music box in the home of Kevin and Rishon Uxbridge. Later, aboard the Enterprise, Counselor Troi begins to hear the music (without having heard it in person) from the box playing in her mind until it overwhelms her and drives her to screaming. Dr. Crusher is forced to place her in an induced coma.
More information: https://en.wikipedia.org/wiki/The_Survivors_(Star_Trek:_The_Next_Generation)