Happiness in the face of philosophical pessimism? What is happiness? Synonymous to happiness is joy, cheerful, euphoric, wellbeing and etc. It's a feeling. It's not a state of mind.
Happiness is unrelated to your philosophy. You can be a miserable optimist and a beaming, happy pessimist. It all depends on the chemicals in your brain; Dopamine, serotonin and oxytocin.
Your well-being of a happiness-inducing brain chemistry depends mostly on genetics and on external factors that still have an effect on our neurochemistry since we were apes. One of these external factors are how high your position is on the dominance hierarchy. The higher on this hierarchy you are, the more feel good chemicals your nervous system releases. It's an ancient natural mechanism that most complex living beings have to make winners feel better, live longer and be healthier and makes losers the opposite.
Your brain is a machine, a system. The only difference is it's made of bio-organic matter and not from plastic and metal, like say a computer is. If a computer doesn't have enough electrical supply, then no matter what operational system you put in it, it still won't run.
It's the same with the brain. No matter what thoughts pass through, they have absolutely no effect on your emotional state, thinking otherwise is factually incorrect, although many bookselling moneymakers will try to convince you otherwise.