Mystics have highlighted that pain breaks open our barriers, that it serves a purpose. When that is true it is of great comfort to know that despite the pain, growth will result, that we will be more resilient or even more loving.
However if we think that every pain serves this noble purpose there is the danger of letting it take control of us for longer than necessary. Rumination is a good example. At a certain point we just revisit things not out of necessity for reflection but because it has become a thinking or feeling habit. In that case taking comfort in pain is dangerous and reinforces misery.