I don't have a simplistic formula to offer you. And I would warn you to keep a safe distance from anyone who does! But I ran across some research a while back that makes a lot of sense.
Most people appear to have one or both of the following expectations about happiness: It is directly related to (1) my circumstances or (2) finding the right person to make me happy. Both beliefs are dangerously false!
First, money, awards, fame, and the typical trappings we link to success don't always make a positive difference in someone's life. Sometimes they only raise the level of stress.
One of the happiest people I ever knew didn't finish high school, was a double amputee due to severe diabetes, and had a mentally challenged daughter. He took pride in his work. He smiled easily and often. He was more interested in other people than he was worried about himself. In fact, I never got the impression that he begrudged any of the things about his life that worried others for his sake.
Second, nobody should have the too-heavy-burden of trying to make another human being happy. It can't be done! The term "co-dependency" has been coined for people who are expecting others to fill up their empty buckets. Don't expect the impossible of anyone in your world. If somebody is looking to you for his or her happiness, resign that miserable task today before it kills you.
People who — to use Jesus' language — "lose their lives" (Luke 9:23-25) bringing sunshine to the lives of others cannot keep it from creeping into their own! It is your life's inner purpose rather than its externals that will provide real peace.
How about it? Do you know how to go with the flow?