I'm typing this post with minor cuts on my left thumb and right middle finger, and even with Band-Aids on they still hurt. So bear in mind how everything I say in this post is slightly more than theoretical for me right now.
Pema Chödrön once said that pain is not a punishment and pleasure is not a reward — that they are simply states of experience, and that it's possible to work towards seeing them with equanimity. Most people I know wrinkle their noses at things like this; I remember a Peanuts cartoon where Lucy was grousing to Charlie Brown about having to go to the dentist. He said, "You're not afraid of a little pain, are you?" She shouted back, "Of course I am! Pain hurts!"
I laughed the first time I read that line — how old was I, eight? — and I still smile thinking about it, all the more because I get the mindset behind it 120%. Nobody wants to be told that pain is just another part of life, because it absolutely sucks. Worse, it's so variegated — the pain of losing a job or the pain of a debilitating medical condition hurt for totally different reasons, like being slapped on both cheeks at once.
Most of us are not in the habit of attempting to see pain and pleasure as just things to observe, rather than things to recoil from or embrace. If you spend enough time cultivating observational discipline, though, you notice things about those states that you don't normally see because you're too busy being wrapped up in the narrative that goes with them (pain = BAD, pleasure = GOOD). Pain still sucks, sure, but when you don't compulsively attach a narrative to it, it becomes less like something the world is doing to you and more like something that is simply yet another parameter of the situation. And pleasure is still fun, but you're less inclined to compulsively seek it out, and thus rob it of its real joy.
You might well already have examples of this in your own life without realizing it. Many of us have encountered some version of the latter — e.g., the guy who can't stop partying even when everyone else has already gone home and there's no beer left in the fridge anyway. He's a bigger buzzkill than the neighbor who tells us to pipe down. The former is a little trickier, but I think it's still possible to locate some variation of it within your own experience — for instance, getting caught in the rain. It's unpleasant and inconvenient, but there's nothing personal about it; it's not like someone deliberately threw water on you.
It takes effort to make such things personal, and more often than not those efforts are executed unconsciously. If you spend even a little time consciously trying to break that cycle, it pays off. Being less invested in either the pleasure or the pain makes it easier to be invested in the things around them that actually matter.
New York City
Other Lives Of The Mind