I recently read a book that deals with exactly this -
Not Tonight Dear, I Feel Fat.
So you know where this is coming from - I am 47, married 26 years. I felt self-conscious at 140 pounds and self-conscious at 240 pounds.
The author says (he has all sorts of studies that he references) that women who feel this way do not generally feel any better about their bodies during sex even after they lose weight. Normal weight, underweight and overweight women can all feel this way. So, losing weight does not make this go away!. At the same time, he strongly recommends regular exercise, which I think is great.
Basically, his advice to women is - have sex anyway. Get really good at it . Get to know your body and what turns you on. Start focusing on how you feel more than how you think you look. Trust your partner - if he is aroused, he is into you! That kind of thing. And I can say that this approach has really worked for me over the past ten years or so. Reading it in this book just confirmed it for me!!
He has other sensible advice as well. He references lots of studies and overall I felt way better about myself and my marriage after reading it. And I got it at the library!