It is always kind of sad to hear that philosophy. It has been used so often as a justification for greed, especially by people like Ayn Rand who believed that greed is the greatest virtue.
Just a little bit of reflection on this shows how simplistic the idea is. Why do people jump to the aid of complete strangers when it puts their own life in danger? When you weigh the good feeling you get from helping someone against the thought of potential death that might result, which action is to your advantage, which is to your good? If you have ever been in that situation you know that there is no thought involved, no anticipation of the good feeling it will bring, only the thought of the danger that someone else faces and their need for help. And you spring to action with that vision of your own vulnerability fully in mind, and the acceptance of the consequences, whatever they will be. In reality it is a matter of putting yourself in the place of the other person. The act is not centered on us, but on the one who needs help.
We all know how small and limited we are, we see those shortcomings every day, but most of us give ourselves over to a larger vision of what we can be. That vision is beyond our desires and gratifications, it transcends our weaknesses and selfishness. We identify with that vision and create ourselves in its image. The act of living out that image is surely happiness, but it is much more than a quid pro quo of exchanging happiness for individual acts.
Helping others can be motivated by a variety of reasons including the happiness it brings us, but it involves just as much the expression of who we are. And, as a social species, humans, to varying degrees, are created with empathy whether we want it or not, whether it makes us happy or not. But the fact that some people are much more helpful and concerned about others should be a good indication that it isn't just about making us feel good.