In Star Trek they face many trials, wars, battles, what was the single worst catastrophe the federation faced, in reported casualties? Was it the battle of Wolf 359, an engagement in the Dominion war, when the Borg went back in time and assimilated all of Earth?
See Richard's answer to What is the bloodiest war in the Star Trek universe?--the largest number killed due to a war on any of the Trek TV shows/movies was 50 billion (in an incident recalled by a powerful energy being known as a Douwd, in the TNG episode The Survivors--this particular Douwd had been disguised as a Federation citizen, and he destroyed the entire Husnock species after they destroyed the Federation colony he had been living in, just three days before the episode was set). In the novels, the highest number Richard found was 63 billion (during a Borg invasion of the Alpha Quandrant in the novel Lost Souls). And if you want only Federation deaths from TV shows or movies (as might be suggested by the line 'what was the single worst catastrophe the federation faced'), there is also the Federation/Klingon war shown in an alternate history in the TNG episode Yesterday's Enterprise, which was said to have resulted in 40 billion lives lost--and since the Federation was losing this war, it's a safe bet that the number of Federation lives was more than 20 billion, or at least, not significantly less than that (if you reject this one because it took place in an alternate timeline, please specify what timeline you are asking about, since the timeline that was created in the 2009 Star Trek movie is obviously different than the one most previous TV episodes and movies have been set in).
This question is not exactly a duplicate of that other question since that one was specifically about war while this one is about death counts from any causes, but I don't think there have been any natural disasters or other non-war-related incidents that have been shown to have killed a larger number.
Possibly over 18 billion
In the events leading up to Star Trek (2009), the planet Romulus is destroyed and its population of over 18 billion is wiped out when the Hobus star goes supernova — a tragedy that Spock tried, but failed, to prevent.
This event is documented in the (fully canon) Star Trek: Countdown comic book series and referred to in Star Trek (2009).
Because of the improved relations between the Federation and the Romulan Empire after Nemesis, and because of Spock's involvement in this incident, I am including this within the scope of the question.
Every Earth-based organism that ever lived and maybe more
In the series finale of TNG, Q convinces Picard to perform an action which causes ripples back in time that prevents life from ever existing on Earth. Arguably, this could be considered "killing" every human who ever lived or will live, along with any non-human Earth species. Just taking humans into account, we're probably talking about trillions or even quadrillions (depending on how far into the future you want to consider). Counting every other species on Earth, those numbers would skyrocket by several orders of magnitude. And given that the anomaly is spreading (it was actually pretty far from Earth when they found it), it could affect many other inhabited planets as well. If it doesn't eventually stop, it could potentially end all life in the Universe.
Of course it was a Q-based scenario, and it was reversed by the end of the episode, and of course all those lives weren't actually ended so much as not started, but depending on how loose your criteria are for a life-ending event, this could qualify.
Possibly over 6 billion
In Star Trek (2009) when the planet Vulcan is destroyed in 2258 in the alternate timeline created by Nero's arrival, almost everyone on Vulcan was killed, which amounts to about 6 billion people - I doubt that there would be another single incident that had that many deaths.
There's also the uninhabited Dyson's Sphere (TNG, "Relics"), which size was equivalent to ~400 million Earths (according to Star Trek science consultant, Naren Shankar). Multiply that by the ~6 billion inhabitants just on one Earth. Even if only fraction of the Dyson's Sphere was populated, that would be well into the trillions gone. I can't remember if one of the crew said they all left due to the star's radiation issues, or did something suddenly happen with the star that wiped them out. Maybe someone can illucidate more on that.