How to prepare my child for the death of our dog

Does anyone have any of ice on preparing a 10 and 3 year old for the death of their dog?

Our pup got sick the other day and went down hill extremely fast and now we’re having to make the very hard de to euthanize him. I’m having trouble coping. He’s been in my sons life since my son was 4 and he’s all my daughter has ever known as she’s only 3 years old. He is their world, these kids would give anything for their pup. Now I don’t know how to tell them or even prep them for this. My son especially as he is 10 and old enough to understand.