Performing noble deeds is the way to happiness

If you love that good should befall others, then you have a blessed gift from Allah.
Ibn `Abbaas (may Allah be pleased with him) said:

“In me, are three qualities? The first is that whenever it rains, I praise and thank Allah. I feel happy for this blessing, even if I myself don’t own camels or sheep to benefit from the rain. The second is that whenever I hear of a just judge, I supplicate to Allah for him, even if I don’t have a case pending with him. The third is that whenever I gain knowledge of (the meaning of) a verse from the Qur’an, I long for others to learn what I know from it.”

All of these qualities indicate a true longing for the well-being of others. Allah described those of an opposite nature:

Those who are miserly and enjoin miserliness on other men and hide what Allah has bestowed upon them of His Bounties.  (Qur’an 4. 37)