Try not to stress about it... i promise that hasn't been easy for me to stay.
I was a size 16 when i got pregnant (after losing 10st and once being a size 28) the intention being that i was losing weight so i could have a healthy pregnancy.
At the start of my pregnancy i only ate crap food, i couldn't face cooking or proper meals without needing to throw up so it was crap food or no food the midwife said, not ideal, but better to eat rubbish than nothing. Things improved after 17 weeks, when the nausea stopped and I tried Slimming World (they have a pregnancy support programme) but i found it too stressful and stopped going.
I couldn't cope with the the weight gain in pregnancy so spent most of it crying about weight gain - i'm currently wearing a size 20 at 35 weeks (i can't carry off maternity clothes oddly) and i've finally accepted that i will have to work hard when my baby is born to get back to where i was when i became pregnant.
It can be done, it won't be easy but i'm looking forward to long walks with the pram and learning to eat healthy again.
It took until i got to about 30 weeks to stop stressing about it and get to this point. The most importnt thing is that your baby is nourished and healthy.
I probably have eaten a few too many chocs and my cravings for apple crumble around 20 weeks probablly didn't help!
You do have to take care of yourself but the driving force should be the baby and not your figure - very few people come out of pregnancy without some extra lumps and bumps plus your body stores fat in preparation for breastfeeding.
I'm sure you'll be a yummy mummy so enjoy your pregnancy you've got the rest of your life to diet!