Sounds like a very difficult situation. Sadly I had a mmc last year (now thankfully and happily 20 weeks pregnant!) and the grief was horrendous, never expected it to be as hard as it was. It took months to get over, and at times I worried I was becoming depressed. During this time my close friend announced she was pregnant, which although was hard, as it realised my own loss again, I was able to separate my grief from her joy, and be happy for her, it wasn't easy but in no way was I personally angry at her, maybe angry at what had happened to me.
Thinking of your SIL sounds like she's been/going through hell, with numerous miscarriages and ectopics, I think this could easily drive anyone to the edge. However, it is not an excuse for her to treat you or your daughter and your soon to be little bundle of joy so bad. Sounds to me like your SIL is depressed and instead of dealing with her grief, of which anger and envy is a natural and awful part, she is taking it out on you, sadly making your life and her own life difficult, destroying what is good.
You are probably not the right person to talk to her about this, but I wonder if your BIL, MIL or someone she trusts could gently begin talking about her behaviour, her feelings, why she is struggling so much, and maybe encourage her to seek help. It must be so difficult for your SIL to deal with her grief, but I repeat she has no right to treat others so badly, its not your fault, sadly awful things happen. I think you've done so well not to have confronted her already, particularly when she's acting so uncaring towards your daughter. Her behaviour is only making things worse for everyone, including her, how awful it must be to be so envious and bitter.
I know its very difficult, but try and not let your SIL anger and depression into you, its her stuff not yours, she's the one who needs to deal with it. I hope she gets the help she needs, and in the meantime if she can't be civil then reduce contact, and keep yourself well