Relationship troubles

I have been with my boyfriend for three years. I love him very very much and I am happy with him. I am not happy with myself though. I’ve gained a lot of weight and I am working to lose it again. I am utterly uninterested in sex because I’m so uncomfortable naked and I know it it is the source of tension in our relationship. We have been having spats more recently and he has told me he feels like he doesn’t make me happy. I’ve tried to explain the situation but I can’t get through to him. I am just really out of ideas on how to make myself more clear. And, I am trying to learn to love myself while trying to be my ideal self. But that takes time. I know that. I’m really stressed and need assistance.