I'm so sorry you're facing this. I have a yellow lab who is 14 and I dread the day her time comes.
As for your children, it depends how old they are. Is this the first pet death they've experienced? If the dog is older than they are, they are under 14.
One thing I will caution you about is to explain to them what "put to sleep" means. I had to put a horse to sleep and I was babysitting my neighbor's children every afternoon at the time. Jet had cancer and my mother in law was dying so I was having to pick my moment because I didn't want to be grieving over a horse when my MIL passed. So I knew I was going to put him down for a couple of weeks before we did it. (I put him down the day after my MIL died.) We were keeping him comfortable with injections.
Anyway, I was out in the stall with Sandy, the younger child. she was probably about 6 at the time. We were talking about Jet and I mentioned he was very ill and I was going to have to put him to sleep.
She asked me, "And then what happens when he wakes up?"
OMG. Well, I have always had a policy of not ducking the honest questions of children. I explained to her that "put to sleep" was just an expression and that what it meant was the vet was going to give Jet a shot that would make him die so he wasn't in pain any more.
So I urge you to be careful with your euphemisms and make sure they understand what put to sleep means. Don't let them think she will "go to sleep and not wake up" because it can cause them to be afraid to go to sleep. Use the word "die" so they know this is permanent and it means the dog is not going to sleep. Tell them she is dying and the vet will help her die a little faster so she won't be in pain any more.
But I wouldn't let them watch it happen. Some animals will thrash and howl as they expire. Don't let them see that. But after the dog is still, let them see the body and say goodbye if they want. Otherwise if the kids are very young they may not believe the dog is really dead. If you are going to bury her, that will help give them closure. But unless they are very mature and over the age of 11 I wouldn't let them watch the process unless they very strongly want to. And then I would prepare them that when the dog dies, the air might rush out of her lungs and it will sound like she is crying but she will be unconscious when this is happening so it won't mean she's in pain, it's just her last breath coming out.
I am so sorry for you. This is the hardest thing any pet owner has to do, doubly hard for you because of the children. If you are religious, it's okay to tell them she is going to doggie heaven and will be running and playing with other dogs for eternity.
Time to build a bigger bridge.