I think you know what you need to do, but you're looking for reassurance, so hopefully I can help offer that. As you mentioned, your dog will likely do something like this again, so you really need to rehome the dog. Unfortunately your dog just isn't right for your home. It can do great in someone else's home, so for the sake of your dog, your kids, and any other kids that come to your house, the dog needs to be rehomed.
Obviously much easier said than done. Your family is probably attached and there will probably be tears, but it's still the right decision. Doesn't mean all dogs will be like this though...you can try out another dog/different breed!
Best of luck to you. That's a really sucky position to be in.