Yes, I know you hate her, at least sometimes. I know she let you down. I know she infuriates you. I know she drains your wallet, your good will, your very soul like a bottomless pit filled with demon vampires. You cannot say a bad word about her in front of your kids. Don’t even imply it. Don’t even think it.
How? How will you accomplish this superhuman feat of self control? “Just be a good person” ⟸ that’s some crap advice right there. If it were so easy, everyone would do it. “Just think of the kids” ... that's better but still really not enough some of the time.
You don’t have to imagine she’s dead, although you may if that helps. But imagine that she’s there, invisible, listening but not speaking. And isn’t that a dream come true - all ears and no mouth?
So you don’t lie, but you can omit, you speak respectfully as you would of the departed. You use a measured tone, by your very bearing you indicate that the topic deserves respect, but is also one that you don’t have to blurt all your feelings about.
We don’t speak ill of the dead, no matter what they’ve done, within reason. When you talk to the kids about why mom is gone, why mom did this or didn’t do that, just imagine that Ghost Mom is there as you politely explain that things happened, nature took its course, and it’s not productive to dwell on the past. Allow some grieving and move on, move forward. The living people in this room are what matters.