2nd pregnancy and gained 14 points in 4 weeks

Just had a 24 week appointment and I'm so devastated to see that I gained 14 points in 4 weeks , I'm already overweight to begin with and so far in this pregnancy I'm up 40 pounds . I know I need to eat better . I actually workout 2-3 times a week and I'm just sad . Don't know what I'm looking for in this post just needed to vent