Pregnancy isn't a time to indulge in cookies, ice cream and candy. When you know that you overindulge, it's a mistake to keep that stuff in the house.
You don't need a temporary diet. You need better eating habits that you can follow for life, not a few months to lose weight and then gain it back.
Don't keep things in the house that you shouldn't be eating. Exercise portion control. For when you must indulge, keep single portion serving treats in the house - individual sherbet cups, 100 calorie cookie packs, not something that you can keep reaching into the box of cookies or scooping into the tub of ice cream.
When I was looking to lose weight, I always did what I alled the quarter plan. I didn't eliminate foods/food groups. I ate the way that I normally ate, but I got rid of 1/4 of what was on my plate, thereby cutting my intake of calories and fat by 25%. It's not an excuse to eat ice cream when you didn't before, if you only eat 3/4 of it, but if you normally have pizza night on Fridays, you still do that but only eat 1 1/2 slices instead of 2. If your family goes out to Friendly's for an ice cream every Sunday, get a 2 scoop and immediately take 1/2 a scoop off and have the server take it away.
Good luck.