Honestly, I think that her behaviour probably seems very reasonable in her own mind.
I don't think it's a mental health problem. I don't think it's actually particularly unusual, although I 100% agree with you that it's unfair and harmful to her stepdaughter. You'll get the impression that it is unusual on MN because MN tends to be the perspectives of women who are already parents, and might well have children who are somebody else's stepchildren, and so the thought of our own child being treated this way makes our blood run cold, but the stepmother isn't seeing the situation from the perspective of her stepchild, she's seeing it from the perspective of herself and/or her new baby. It's very rare on MN for a woman who is a stepmother without her own children, or a stepmother who is planning for or pregnant with her first biological child to actually have a voice, partly because most people don't find MN until after they have children, but partly also because they get this hostile response so if they do ever express feelings like this they learn very fast never to do so again. Bear in mind as well that some MNers are dealing with exes and step-parents who were the Other Woman.
But I think it is very difficult for stepmothers to navigate this kind of situation. There is so very little to prepare anybody for parenthood; there is even less, in fact, probably no resources or support at all for step-parenting, especially step-mothering.
Think about how you felt about DC before you had them, it was likely to be unrealistic, you probably had some ideas that you look back on and cringe at. If you think about how you acted around friends' kids that might be some help as well. Women who enter into a relationship with a man who has children don't magically gain insight and knowledge into how to be a parent upon doing so, and because separated fathers tend to have their children much less than 50% of the time, it's really not a situation where she ends up gaining those skills or knowledge. Not all separated fathers are great fathers either, there are huge challenges there, some men manage to rise to the challenge and be an appropriate father to their children, but many fall into the trap of wanting their more limited time with their children to be special or magical or always perfectly happy and so they end up in this "Disney Dad" kind of pattern which would simply not be sustainable with children who were around more of the time.
Plus there is socialisation at play in that we (rightly) tend to think of a child's relationship with their biological mother, especially if they live with them most of the time as being of utmost importance and so I'd imagine that being a stepmother is quite difficult as on one hand you want to get to know your partner's children and develop a good relationship with them, but on the other hand you can't be a mother to them, as they already have a mother, and you probably don't want to encroach too much on your partner's time with them, particularly in the early stages of a relationship and you probably get into the habit of hanging back a bit. So I think that many stepmothers end up developing a kind of auntie, or family-friend relationship with their stepkids rather than a parental one, and in many cases this is absolutely appropriate, but it all gets messed up when you introduce a new baby into the mix.
Again, I'll go back to the point which I can't really hammer home enough: Nobody gives you a manual for parenthood, the transition into motherhood is incredibly hard, but lots of people will give you advice. Nobody hands out manuals or advice for step-parenthood, and so even if you did manage to get some idea about what the transition to motherhood is going to be like and how you should handle it, you might as well just throw it all away, because the situation is so massively different, and very delicate to boot. There are so many more things to get wrong, and of course you're going to get some things wrong because you're human. But also, with your first child, everyone is giving you the normal messages which they give to new parents in ordinary situations and much of it is inappropriate. Like, for example, creating a sacred space between you, your partner and the new baby. Absolutely appropriate for most people, definitely not for step parents, because the stepchildren need to be supported and actively shown that they are still accepted and loved and have a definite place within this family. You lose out on a lot of the expected "first parent experiences", and that must be incredibly hard. I mean, ideally you've got to create, before the new baby arrives, the feeling that the stepchildren are also "yours". Not in the same way as they are the children of their biological mother, but you've got to actually place yourself in a parental position, a position which doesn't really have a name or a precedent, where you're their parent but not their main parent. Where they are accepted and loved and absolutely your childrens' sibling[s], and that they also only happen to live there part time. It's a bloody difficult concept to get anyone's head around and rather unlikely to occur to anybody in advance, so I think MN's (collective) expectation that all stepmums immediately get this right and never make any mistakes at all is really unrealistic and quite unfair actually. Though it's difficult because it is the stepchildren who end up suffering and feeling rejected when it goes wrong, and as a separated mother (and a stepdaughter myself!) I can totally relate to sadness about children feeling pushed out. It probably also doesn't help if the father of the baby is (consciously or not) seeing this as a "new family" and acting as such, rather than that he is extending his existing family - again v complicated, because he's probably doing this for a multitude of reasons including wanting his current partner to feel that she is not second to his ex, and that the experience of a new baby is as special to her as it was to him when he did it for the first time.
If I could have any advice for a stepmother who is about to become a mother, it would be to read books about sibling relationships and how to deal with having multiple children, (I recommend "Siblings Without Rivalry") and she'll have to adapt the text and read between the lines a lot to change it for her own situation, which is also what she'll need to do with the traditional baby books, BTW - but mainly to understand the importance of making the older children feel accepted and included, and also to understand that her experience of new motherhood is going to be drastically different to that of other women who are not stepmothers, and she really needs to deal with her feelings about that, grieve if necessary (and it might be) but basically come to accept that her situation is just different, but that it will be okay and there are huge benefits to it as well.