I'm so sorry to hear about Petie! It's tough losing one you love, and yes, animals count in that category! They are with us more than people are, sometimes, and dependant upon us the way children are, so why shouldn't we feel a deep loss when they are gone. Give yourself time to grieve, and cry. You might even want to have a family get-together to remember Petie's best moments (though it might be tough to do that right now). I'm glad you will be with him. It's hard to be with a pet who is being put to sleep, but I think it's something that helps both pet and person in the long run. You can talk to Petie and tell him how much you love him and what a good boy he was.
I'm sure he had a wonderful life, and knows that you all love him.
When the hurt is healed a bit, you might want to think of adopting another dog. Not at all to "replace" Petie, because nothing can, but to give another animal the chance to have a good life, and love and be loved. Until then, you might consider, in honor of Petie, volunteering to dog walk at your local shelter (where you might meet that next dog who can become part of the family).