It's possibly not a Star Trek episode, but someone here might know of it. All I remember was that it opened with a call for a repair crew to fix a power outage on a deck. When the lift door is forced open by the team, they see a gutted deck. Propped in front of the lift doors was this creepy doll that laughed at them. One of the eyes rolled back to reveal a gun barrel and shot the team.
It freaked the fvadt out of me as a kid so much that I couldn't watch the rest of it. Now I want to find it and find out what happened.