Perspective and expectation.
I hate to go cliche here, but it's learning to want, appreciate and enjoy what you have more than what you don't have. Happiness is a sense of fulfillment I get when my needs are met.
Sadness, in contrast, is a sense of not being fulfilled, of being left wanting in some way, and there are so many different ways.
We strive for happiness to feel peace and maybe a sense of belonging. Sadness, at least for me, is always chaotic and tumultuous without peace or a place to rest; disappointment and heartache.
Perspective colors our expectations. It's one thing to hope for food, it's another thing to hope for a 5 star restaurant. What were you expecting, were you disappointed?