To be happy, control your attention.
Attention determines what will and will not be in our consciousness. It also controls other mental events like remembering, feeling, thinking, and making decisions.
Your thoughts, not your circumstances, determine your happiness. No matter what the external circumstances are, you can achieve happiness by changing the contents of your consciousness, i.e., your thoughts.