Sometimes I look around a busy store and think about the massive coincidence in all these independent intelligences having come about and came to be here right now, buying detergent, and I am overwhelmed with the beauty of it. Not because it means anything, but because it doesn't have to. It just is, like fractals or recursion, and just like those forms of emergent beauty, that awe makes me happier than I could ever be striving for something that doesn't exist.
I'd recommend looking into Buddhism and ignoring the bits about reincarnation and karma; the rest of it is basically Nihilistic and still leads to contented, happy lives (after all, the ultimate reward in some branches is total annihilation.) I personally assume that the purpose of doing good things is because we have a choice: we can make the world better or we can make the world worse. With no reason to do one over the other, what kind of asshole chooses to make the world worse? Especially since they then have to live in that worse world. It's just stupid.
Mindfulness meditation is extremely useful in tamping down panic attacks or dealing with chronic physical pain.
I know using medication or treatment I can block that craving for meaning (lack of which ultimately causes despair), but I'm just unsure right now whether such a thing should be done.