I have several ways I cope:
Satisfaction that the rich are going to get fucked by climate catastrophe and ecosystem collapse just as much as everyone else. The climate change deniers will starve just like the rest of us.
It's been billions of years before I existed, and potentially trillions of years afterwards. I'm incredibly lucky to be aware and thinking, so why should I complain about stuff happening after my spark of awareness has faded?
Earth will continue without humans just fine, eventually getting swallowed by the Sun. Nothing humanity has done will survive.
Celebrate being alive to experience the universe.