It's not that black and white in my opinion. It's good to be rational, but ignore your emotions at your peril.
Kin selection in evolutionary psychology may have wired our brain in such a way that we experience happiness when we sacrifice ourselves for the good of the tribe. Possibly a kind of happiness that is difficult to achieve in any other way.
If someone's aim in life is happiness, whatever that means to them, it can be a perfectly rational choice to engage in materially selfless acts such as volunteering in homes for disabled orphans, or finding a cure for AIDS. It doesn't even need to be done publicly, although that has the added benefit of reciprocated social status.
Ultimately it does serve a selfish purpose of course - to improve one's own happiness. I see no contradiction or "lack of integrity" in that. If it works for you, go for it!