The way to be happy is to love others unconditionally. If you love everyone, no one can hurt you. Love is another way to get rid of the ego which can produce profound realizations. But love itself is the supreme spiritual realization. It is the lesson we are incarnated to learn, the purpose of life.
Love does not necessarily mean you try to please another person. We try to please another person when we want them to love us. Wanting to be loved is a completely different phenomenon from loving others unconditionally.
You can learn to produce feelings of love through meditation. When you experience reality through the filter of love instead of egoism, all the reasons for many unpleasant emotions, anger, hate, jealousy, envy vanish. Existence is transformed, and you will not want to go back to the old way of existing.
At first, meditation is a way to produce love intentionally. But after you experience how love transforms existence, meditation becomes natural because existence in love feels so much better than existence in ego. You will express love naturally because love is a preferable way in which to exist.