J.C.
I would tell the children the least amount of information as possible about what's going on. I come from a divorced family, my parents divorced when I was about 12. If I were you, I would sit my kids down and explain to them that you need to talk to them about something, but you want them to know that nothing you are about to say has anything to do with anything they've done, and it is something that is strictly between you and their father. Then I would explain to them that sometimes when people are married, they end up finding out that they're not good for each other. It doesn't mean that either of them are bad people, it just means that when they're together, things aren't as they used to be when they first became a couple. There is no reason why you or your husband should ever say anything negative about each other to the kids. I've dealt with that my whole life, and it is horrible and hurtful and well beyond what a child is capable of understanding. As long as you and your husband leave the kids out of the divorce part, I truly believe they'll handle it the best way they can. Make sure you give them time to ask any questions that they may have about what everything means. Make sure you also let their school counselor know so she can watch out for them at school. Most importantly, try to leave decisions about spending time with their dad/mom up to them as much as possible. I realize that you guys will probably come up with a custody agreement, but I would make sure that in the meantime, keep the kids involved just a little by asking them if a certain schedule is okay with them. My mom and dad set up a schedule and then forced the three of us to stick with it. It ended up making me rebel against going to my dad's because I was getting to the age where I wanted to stay home and hang out with friends, and my dad lived about 20 minutes away. I would also buy a book or two to read yourself and really educate yourself on what experts say how to handle divorce and how to help kids make it through without blaming themselves and being dragged down.
Last but not least in any way, take care of yourself. You are the only mother these kids have. If you're going around the house depressed and upset, they don't have anyone else to balance you out. Kids depend on their mothers for security, love, and nurture. If you're not able to give that right now, do something about it as soon as you possibly can. The longer you wait, the longer your kids are going without their mom being there for them like she normally is. Do what you need to do to get your life where you need it to be, and then you'll be able to be the mother those kids need