I'm so sorry to hear you have been going through all of this. I too am trying to heal after an emergency surgery that went awry. I almost lost my life in that surgery, was airlifted to a major hospital because the one I was in didn't have the life-supporting equipment to keep me alive, and it has been a rough road ever since. I have been "recovering" for the last 11 months, and like you, have lost a lot of weight and am in a lot of pain. This, after having been given very strong pain medications.
If you can, eat lots of protein; it helps the body heal better. That is what I have been told time and time again. Unfortunately, it can be a little difficult for me to take my own advice, since I am not much of a meat eater and have, at other times, gone completely vegetarian. But if you can stomach it, your body needs the protein to heal. Very important.
Also, I agree with what others have said here. Listen to your body; doctors can be wrong, or simply misguided, even though they mean well. It sounds like you have a doctor that does care about reducing your pain, so obviously he means well, but if you don't feel well when you take the meds, try to reduce the amount that you take and/or wait longer between doses. For instance: If the pain medication is to be taken every 4 to 6 hours, instead of waiting only 4 hours, maybe wait 6 hours.
I would seek the help of a nutritionist if it is possible. I think it's a good idea to take less medication and to feed your body what it needs to heal. Remember, too, that your body is the expert. Not the doctors. Your body will tell you what you need and what you do not need. It sounds like you are listening. Keep listening and remember that you are in charge of what you put into your body.
Another thing that will help is to get more physical, if that is at all possible. It sounds like you were a fit person before all this happened and I realize (because I am deconditioned atm as well) that you are not in the same physical shape you were before. But with little steps, you will be. After my life-altering surgery, I couldn't walk anymore. I had to use a wheelchair. I was mortified, as I was a gymnast before. I think the reason that I walked 4 months before I was told I would was this:
I have a built-in bed, with two steps leading up to the mattress (since I am small -4'11"- and the bed is tall) but needed assistance even going to the bathroom after my surgery. Family / friends told me to take the couch as it would be "easier" than trying to get up and down those couple of steps every time I needed the bathroom. I refused. After many falls (lol) when no one was around to help and about 4 months, I finally went from not being able to make it to the bathroom to being able to walk anywhere in the house, except I couldn't take the stairs. With time, I finally, mastered the stairs to the loft and to the basement. I simply refused to give in; the only way out is through. In gymnastics, we were taught to never say "I can't." You want to give up, but it's the last thing you should do. It is so very difficult, at times. I know. Retrain yourself as well as you can. You might not get back to where you were as a jogger and bodybuilder, but then again you might. I got back to where I was before the surgery, and I am sure you will be able to as well. You sound like you know what you need to succeed. You will feel much more normal when you are not confined to a bed, or a room, or a hospital.
I am new here on BL but I hope my advice makes sense. I really feel for you. If you need help, or someone to talk to, I'd be glad to help where I can. Take care and remember your body is your guide.