Just for fun, I'm trying to come up with a list of all the deaths of main characters in all the series. I thought there was a list already on Memory Alpha but I couldn't find it.
This is just off the top of my head, so I'm sure I missed some. Please help fill it in!
TOS:
Kirk - Spock kills him in Amok Time. Nexus kills him in Generations. Dies for real at the end of Generations.
Spock - The Wrath of Khan
Scotty - zapped by Nomad in "The Changeling."
TNG:
Picard - Killed by the Borg in the alternate timeline seen in "Parallels"
Riker - KIA in battle with Klingons in "Yesterday's Enterprise"
Data - Head blown off in "Time's Arrow." Dies at the end of "Nemesis."
Yar - Killed by Armus in "Skin of Evil"
Worf - Dies during spinal surgery
Wesley - Moves on to a "higher level of being" (not sure if this counts as dead or not. I'm ignoring the cameo in Nemesis. That was probably a holodeck recreation.
)
DS9:
Sisko - Dies at the end of "What you Leave Behind"
Dukat - Dies at the end of "What You Leave Behind"
Jadzia - Dies in Tears of the Prophet
(I've seen significantly less of Voyager and Enterprise so I'm sure I've missed several here. Especially considering the number of alternate timelines in VOY)
VOY:
Harry Kim when Voyager is split in half
Kes - moves on to a higher level of being (might have died)
Neelix - Dies and is revived by Borg technology several hours later
Capt. Janeway - Mentioned as deceased by Naomi Wildman when Voyager is split into multiple timeframes
Enterprise:
Trip - Dies in last episode.
PS: I decided to include scenarios when the characters were presumed dead as well - hence Kirk's "deaths" in Amok Time and Generations.
This is just off the top of my head, so I'm sure I missed some. Please help fill it in!
TOS:
Kirk - Spock kills him in Amok Time. Nexus kills him in Generations. Dies for real at the end of Generations.
Spock - The Wrath of Khan
Scotty - zapped by Nomad in "The Changeling."
TNG:
Picard - Killed by the Borg in the alternate timeline seen in "Parallels"
Riker - KIA in battle with Klingons in "Yesterday's Enterprise"
Data - Head blown off in "Time's Arrow." Dies at the end of "Nemesis."
Yar - Killed by Armus in "Skin of Evil"
Worf - Dies during spinal surgery
Wesley - Moves on to a "higher level of being" (not sure if this counts as dead or not. I'm ignoring the cameo in Nemesis. That was probably a holodeck recreation.

DS9:
Sisko - Dies at the end of "What you Leave Behind"
Dukat - Dies at the end of "What You Leave Behind"
Jadzia - Dies in Tears of the Prophet
(I've seen significantly less of Voyager and Enterprise so I'm sure I've missed several here. Especially considering the number of alternate timelines in VOY)
VOY:
Harry Kim when Voyager is split in half
Kes - moves on to a higher level of being (might have died)
Neelix - Dies and is revived by Borg technology several hours later
Capt. Janeway - Mentioned as deceased by Naomi Wildman when Voyager is split into multiple timeframes
Enterprise:
Trip - Dies in last episode.
PS: I decided to include scenarios when the characters were presumed dead as well - hence Kirk's "deaths" in Amok Time and Generations.