Feeling down about having to take medication

I am dealing with some mental anguish over taking medication for my pain. I take Lyrica 150mg 3x’s a day and it helps so much. However, I am gaining about 2 pounds a week on it. I tried not taking it thinking since I have been more active I would be fine. One day without it and I feel like an entire gang of people beat me up for hours. My pain shot up to an 8. So I took it again and already significantly lower. I don’t want to gain weight, but if I don’t take it I can’t function. I am more active with the medication as luckily, my only side effect is weight gain. But i want to be pill free. How can we change this cycle of pain? My muscles are so tight and stiff and I have no range of motion with my arms or hips unless I take this medication. I am just feeling down about it.