Didn’t Scotty get zapped by a lightning bolt by some alien thing? Or was that McCoy?
Spock got shot by poisonous flowers and zapped by lightning in 'The Apple'. He got 'stuck' with a giant amoeba on his back in the 'Operation - Annihilate!' and lost his 'mind' in "Spock's Brain".
I think the closest Scotty got to dying was when he got really old in 'The Deadly Years'.