mmm I've been in a similar position as you, I found out my dh was having affairs all over the place when I was 7 months prg. So I made a decision to keep the marriage together until I felt I could cope with 2 small children.
It broke my heart, even though I'd had my suspicions for a while, when I finally knew for sure it was awful.
I managed to keep it together for 6 months, and then it was definitely easier to be on my own. Once you've emotionally detached from someone (as you have to if they're off shagging around) it becomes impossible to live with them.
So, all I'm saying is that whilst it might seem a good idea to stay whilst you're studying, the reality of doing that may be too much to live with.
I was lucky in some ways as I had always paid all the bills, so when I kicked him out, it wasn't too much of a shock to pay for eveything. However, a friend of mine had to leave her house because her xh refused to pay the mortgage, so it was repossessed. She simply couldn't make him pay.
So, you might want to have a rock solid back up plan in case your husband doesn't do the things you expect him to.
I wish you luck MMM, you're going to need lots of support once the baby arrives.