Our happiness is directly tied to our wants.
When we want things that are out of our control, we are unhappy.
The key then is to limit ourselves to wanting things that are in our control to have.
I cannot control what people give me, but I can control my giving to others.
I cannot control whether or not people will be my friend, but I can control whether or not I am a friend to others.
I cannot control whether or not I am loved, but I can decide to love others.
I cannot control whether or not people serve me, but I can decide to serve others.
So instead of seeking happiness in receiving, being loved, being served and having friends, I will find happiness in giving, serving, loving and being a friend.
Now, I control my happiness because I am getting what I want.