Happiness might simply a matter of balancing different variables in a mathematical equation:
Perhaps the best way to explain how this equation works is by way of an example.
What makes my commute a happy one (that is, what makes t > 0)? CR represents the certain reward. Since there is never any certainty when commuting--every trip is a gamble of some sort--this value is 0. (For the sake of simplicity, I'm ignoring some of the symbols that are necessary for the mathematics to work.)
The EV is the expected value of the gamble; in this case, my EV represents getting to work on time. The RPE is the difference between my expectation (i.e., getting to work on time) and what actually happens (i.e., the time I get to work). Thus, if I am early--the outcome exceeds my expectations--my RPE is positive (and my happiness is greater); however, if I am late--the outcome failed to meet my expectations--my RPE is negative (and my happiness is lower).
However, my happiness is also affected by what happens to other people around me. Suppose the train I am on is delayed, I am definitely going to be late for work, but someone else might not be. I might be envious of her--my result (R) is less than hers (O), and my happiness will be affected. My happiness is linked to the inequality I perceive around me--in this case, I will be late while she won't.
We can try to make happiness an exercise in managing our choices. What are the risks that we take? What are our expectations and how do those expectations compare to the results? How do we react to the the success (and failures) of the people around us? Do we feel guilty about our success? Our we envious of theirs? Are we indifferent?
But what what makes us truly happy is not necessarily managing these choices--that is, manipulating the variables of happiness. Rather, what really makes us truly happy is simply being aware of the choices we are faced with and asking the question Where will this choice lead me?
Perhaps this is what Jesus meant when he said, "Blessed are the pure of heart, for they will see God." (Matthew 5:8) To be "pure of heart" is to understand that what truly makes us happy is to love God and love neighbor. When every choice we make is in service of that goal, we will discover that love is its own reward--we will see God; all the differences converge to 0, and we are left with just a single term in the happiness equation, the expected value (EV) of God's love, which just happens to be a definition of hope.
True happiness, then, is to live in hope.