My boyfriend thinks of porn while we are having sex

So here is the thing… (and be gentle, this is my first post) I’m 25 and my boyfriend is 35, we have been together for almost 2 years. Our sex life has never been spectacular but it was good enough (I still had an orgasm eveytime even though it was pretty monotonous for my likikng & appetite) we were having sex fairly regularly (3 or so times in the week) when he was home from camp (he works 7 days on 7 days off) then things changed. It didn’t happen all at once but slowly just came to a screeching hault for the most part. A big part of it seemed to be his drive and performance was down. We made a comeback though and things started to look up again. He was initiating it much more than before, it wasn’t so monotonous and I was satisfied mostly. We stopped having bummer, overly emotional conversations about the problems all the time and I made a bigger effort to make it fun and climactic for both of us. I was trying to be a real team player, it is more fun if we both “get there”. Months went by and the same thing started to happen. Again, slowly and not all at once but the same effort on my part wasn’t doing it for him anymore. I could feel this dark cloud around anytime I wanted sex and the exact moment he just gives up trying my heart sinks a little more each time but I put on a happy face and finish him off willingly. Recently the same thing happened but this time he wouldn’t let me help him. He said he didn’t want me to have to work so hard, that it wasn’t fair to me. On one hand I get where he was coming from, he didn’t want to disappoint me again but I thought we were a team and him giving up let me down more than not having an orgasm would have. We had talked about him going to a doctor to cross that possibility off the list before but he always put it off and resisted. After that day I just made the appointment for him. The appointment was set for a Monday so all we had to do was get through the weekend. In addition, we were having troubles I guess you would say in other areas of our relationship which put extra pressure on us. He doesn’t communicate his feelings very well. He turtles in and pushes it down. I on the other hand am the exact opposite.. I want to talk right away and get it all out there (it is something I’m working on) for 2 days I kept telling myself to leave well enough alone, don’t ask questions you don’t want the answer to and just wait until Monday to see what the doctor says but it was eating away at me. When I told him about the appointment I made we spoke briefly (I was trying to tread lightly to not hurt his feelings) and he said he didn’the have the same issues when he was masturbating so it must not be physical. I confirmed by saying so there is only problem when I am in the room. He said yes. (Ouch) I think I would have waited until Monday to talk more but that set me into a self conscious tail spin. We didn’t speak about it the rest of the day but after a night of bad dreams involving him and other women (I have bad dreams frequently) my emotions were running wild and I pushed the issue when we woke up. After a while I started asking direct questions (because getting information out of him freely is like juicing a rock) he admitted to masturbating at least every other day while at work (never trying to include me in it btw as I work out of town too and have on many occasions sent&asked for pictuers/videos and would be more than willing to participate) when we would only have sex maybe once or twice the week he was home and I initiated it, that he thinks of porn while he is inside of me and that he isn’t as attracted to me since I gained weight (double ouch.. soft spot for me for sure) (part of the reason I gained weight is the lack of intimacy and living isolated in the place he wants to live plus he has gained weight too)