My mom and I have never been that close. She wasn't around much when I was living at home and we've lived in different states ever since I graduated high school.
She visits frequently due to the flexibility of her job, and lately I have really been struggling to maintain a positive relationship with her because of my daughter.

She is just very critical and rude. For example:
A few months ago she told me that she couldn't relate to me like she can my younger sister because I'm not "educated". I was floored by that. No, I don't have a master's degree like they do, but I do have a good, professional job and by no means am uneducated.
Last Friday was my birthday and also the due date for my first loss, and she knew how difficult the day was for me. The first thing she did when she saw me was rub my belly and ask if there was anything in there because there was a bump. Later that same day, we were shopping with my sister who was trying on a dress. I asked what size it was and if I could try it on also, and my mom immediately interrupted and said there's no way that will fit you, you will need a bigger size.
She told me last week that she wishes she and my dad wouldn't have gotten divorced because then maybe I would have gotten a better education and have been more successful. It's like I have failed at life already even though I'm 25, have been married to a great guy for 5 years, have a perfect 2 year old, a beautiful home and a good job.

Sorry for the rambling but I'm just constantly hurt by her comments. I've also asked her repeatedly to not do certain things with my daughter (give her a cell phone to play with constantly, don't give her milk before she's eaten, etc) and she does it anyways, right in front of me even.

I don't know how to maintain a positive relationship with her without being constantly upset, but I feel like I need to because of my daughter.

Any advice or commiseration?