Depression while pregnant

So I'm almost 30 weeks pregnant and I've got a lot of my plate and have been dealing with depression for a while now and it wasn't so bad and i could handle it but then recently my bf broke up with me and it's full force now. I sleep horribly, I cry so much, I can't focus, I literally just want to lay in bed all day and cry. I plan on talking to my ob about it about it at my next appointment so she can hopefully refer to someone because I don't want all this stress to affect my baby. My question is can they prescribe meds while pregnant? I've never had depression during pregnancy. I did have PPD with my first son due to his father cheating on me while pregnant so now Im pretty sure I'm going to go through it again with this baby due to my bf wanting to break up during my most vulnerable time.