Anger is a very common response any death - but to suicide especially.
I feel so heartbroken for all of those involved - your poor SIL, whose mind was so mixed-up that she saw no other way out of a comparatively simple predicament; your BIL and his DD, who will be tormented with a huge range of emotions - grief, betrayal, anger despair and even self-blame. (Be especially aware of any tendency to this in your niece - children can't understand the complexities of death and often feel that it is their own behaviour which has caused it. It's hard enough for adults to understand, never mind a four-year old, particularly if she has been having tantrums or any other natural childish rebellion lately.)
There is no easy or "correct" way to respond to a bereavement of any type.
What I can say with assurance is that people who take their own lives don't always do it as a way of getting themselves out of what they think is a dreadful situation - they very, very often do it because they feel that they have damaged the lives of the people they love as well, and that if they don't irrevocably leave, then that damage will get worse.
Believe it or not, it may be that she was trying to save her husband and child from pain.
I hope that when you have had time to think about things, and work out your own shocked and conflicting emotions, you will be able to spare her some compassion. She must have been in hell, even though it apparently was one of her own making.
And none of us know what goes on in any marriage - perhaps she and your BIL weren't anywhere near as happy as people thought - maybe she was even afraid of him (and fear doesn't always have to have a basis - perhaps she was worried that when the truth emerged he wouldn't let her see her child, and she felt she couldn't live with that loss.)
Her emotions will have been wild and conflicting and terrible. She may well have thought that she was doing the best fr everybody. You are entitled to be angry - suicide is a very violent and shocking act and impacts on a lot of people - but in time your thoughts about her may change and become more forgiving.
In the meantime, do your best to put your own feelings aside and provide support for the husband and child she has betrayed (I'm not excusing her actions) and who will be in shock. Don't say anything about her in their hearing (small children notice a lot more than we realise). Reassure your niece that her mammy loved her but was very poorly and didn't know what she was doing. You will most probably find that over time you will be able to let go of your understandable rage, and feel more compassionate towards her. She is a victim as much as they are.