Confusing pain to be pleasure and vice versa is one of the 4 pre-suppositions for ignorance, according to Patanjali.
Yoga Sutra 2.5: Ignorance is the act of mistaking any of the following, impermanent to be permanent, impure to be pure, pain to be pleasure and non-self to be self.
Lets ponder on pain for a moment. Is it really pain or pleasure, if a life-threatening disease challenges the person's will to live and they find a way to manage the disease while still live a fulfilling life?
Is it really pleasure or pain if a person is blessed with abundance and spends their life with no appreciation for what they have? Does pain and pleasure have something to do with how the situation is looked at/utilised?
What if, your biggest asset is a weakness and your deepest suffering is a blessing?
Would your life be the same?