This can be analyzed per the ethics of choices and avoidances based on pleasure and pain. In some cases we choose pain, with the intention of greater pleasure to follow. Exercise is a common example. What is notable is that the painful experience is instrumental to achieving pleasure.
While it's natural to feel pain when others are suffering, ceasing to seek pleasure will only diminish one's own efficacy. So I would say that it's actually necessary to continue to seek pleasure. That's the basis of our ethics: if we throw that out, we have nothing to guide us.
If we're in a position to help others who are suffering, then we can choose certain pains with the expectation achieving the pleasures of successfully helping them. If we're not in a position to help them, seeking out pain is basically pointless.