Most people find their feelings informative: having a feeling like resentment or excitement tells them something about themselves. Usually it also tells them something about actions they have to take: for instance, most people who start to feel resentment or sadness when they're with a close friend will take it as indicating there's something to discuss.
This means emotions are a kind of perception. Ordinary perception—like when you look around a room and see things—generates beliefs inside you about what the facts are in the outside world. What, then, does the emotional kind of perception tell you about? What type of information do emotions convey?
Other people's emotions also tell us something about when we're helping them or hurting them. We have the intuition that it's usually better to make someone happy than sad. But this isn't the whole story—if we drug them to make them happy, that maybe doesn't count as helping them; if we tell them the truth and it makes them sad, that might still count as helping.
So making someone feel good isn't the whole story of when we're helping them.
Why, then, does this idea about making someone feel good mostly work? Is there something that correlates with happiness (but not exactly) that tells us more precisely when we're helping or hurting someone?