Gym anxiety

Stick with me on this. Its hard to put into words and might sound silly when i write it down... I really want to lose weight and feel better about my body. I'm 30. Ttc our first for over 2 years now, I've gained a stone and my mood and confidence are in the toilet.... so I go walking - when I can get myself out the door, I always feel good afterwards even though that knowledge isn't enough to get me out there some days. Some days I close the door and sit on the sofa angry with myself. My hubby took me to the gym with him (safer than walking the roads) and I did 30 mins on the treadmill and suddenly i felt really claustrophobic. I felt like a big white elephant and that everyone was staring at me, waiting for me to do something stupid... my rational brain tells me to wise up. The whole world does not revolve around me, there were only about 4 people in the gym after all!!! I know I should put my head down and do my thing and these thoughts will pass but everytime (yes it's been more than once) I bottle it and go and sit in the car until my OH is finished. He's very good in the sense that he doesn't ask questions, he doesn't scold me or make me feel worse, he tells me he knows that someday I'll find it in myself to cope and push through. I'm not so sure and I feel so angry with myself. Believe it or not I come across as quite confident if you were to meet me in work! I just don't know what it is about the gym... has anyone else felt this or am I losing my marbles???? Any tips for coping are appreciated.