Two things:
Faith. When I was younger atheist leftist, I was depressed by the thought of being a speck of cosmic dust, irrelevant in endless vastness of space. But learning I am a living image of God instilled this inherent sense of worth to myself. Also my job makes me feel like a contributing member of the society, a couple of years ago I hit the rock bottom, was unemployed and homeless, now I have an apartment of my own and working as frontend soy dev code monkey. Every year is better than the last, at least.
I aim to do at least one fun thing a day. If you can't find anything good in your day anymore, its probably time to end it. The fun thing can be sitting in a cafe, eating a cinnamon roll and a latte and watching the hustle and bustle of the city, cooking something good, even hanging out with neighbours or painting. This is distinct from hedonism, where the worth of your life is defined by pleasure. I used to be an addict, so I know very well chasing pleasure is, counterintuitively, a life without much enjoyment. You gotta learn to enjoy the little things, as hollow and cliche as it sounds, it's true.