There are a few different kinds of Buddhism. Mostly I go to Buddhist meditation centres in the Theravada tradition (from Burma), but there's a Tibetan temple not far from where I live so I've been going there for weekends.
I'm not really on board with the Tibetan idea of going out looking for a young child to name him "The Dalai Lama" and then taking him away from his family and friends and.... either nurturing or grooming him..... to grow into a wise old man. But irrespective of how the current dalai lama came to be in the position he's in, I'm taking a lot from his books. I think he has over a hundred books now, and I've read two of them. I ordered a third off eBay and it arrived this week.
In his books he talks about afflictive emotion, specifically the emotion that doesn't do us any good, such as anger, hatred, resentment, jealousy, worry, and so on. Now personally my own theory on afflictive emotion is that we have it to keep us safe living in a community. For the most part humans live in groups and so we've evolved to be honest and trustworthy. So feeling emotions like shame and guilt can be conducive to keeping us in good stead with the community to maintain our trustworthiness. Even anger and jealousy can be useful to protect our personal boundaries.
The purpose of physical pain is to get us to stop what we're doing before we injure ourselves. Physical pain would be totally pointless if it didn't serve this purpose. That's why I think trees don't feel pain -- they can't do anything about someone chopping them with an axe so why bother feeling pain. And I think maybe emotional suffering is similar in its goals.
I heard a guy say recently that there are two kinds of pain: the pain that hurts, and the pain that alters. That is to say, you can be hurt by an experience and just fall down into all the pain and hurt and suffering of it -- or alternatively you can change.
It's funny, if you were to ask me what's the worst emotion I've ever felt in my life, that's an easy one -- it was my first Thai boxing fight and I was in the corner after the 2nd round waiting for the bell to go back out for the 3rd. The feeling that I just couldn't go on was the worst emotion I've ever felt. But that doesn't really make sense if you put in perspective with other things that have happened in my life, such as the girlfriends I've broken up with, or the friends I've lost to death. Maybe these other things didn't hurt as much because they changed me instead.