First of all, I am sorry for your loss. It is hard when a loved one dies. If your children were at all close to him, then they have lost, too, and need to be allowed to say goodbye.
I live in Japan, and funerals here are open to all ages, and last three days from a wake in the house where the deceased spends their last night at home in the company of their family, to a night in the temple, again with the family but in a coffin, not a futon, and then the cremation the next day, culminating in the skeleton being brought out and the bones broken up with chopsticks and put in the urn by all the family members. There is absolutely no room for misunderstanding that the person is dead and gone, and at the end of the three days everyone is sick of ceremonies and exhausted by grief. In some ways it makes it easier to step back into normal life.
I know that Japan is not America, (where I assume you are) but I think they have some things right that we westerners have not. First of all the dead person is not icky or scary - after all a few hours before they were our living, breathing, much loved relative. Everyone is allowed to mourn, all together, and they see the entire process from beginning to end, so there is really a sense of closure.
When my English grandfather died I arrived at the church to see his coffin there, closed, and I wanted to yell and get them to open it up, because it was all some kind of horrible mistake. It was too much of a stretch to me having seen him a couple of months before, to a box in front of me, and knowing I’d never meet him again. It took a long time to get used to.
When my husband’s grandmother died, we were called the night she died, and flew back to his hometown by the next afternoon. She was already at home in a futon in the living room, and we went in and knelt by her and paid our respects (only looking, not touching.) As the day went on the house filled up, and of course there were great grandchildren who started off solemn but after a few hours were running about and even tripping over her legs at one point. They never showed any sign of being scared of her and they I am sure had never been to a funeral before.
My husband protected me from actually handling the body, because I was newly married (three months!) and had not known her, and was upset at the idea of dead bodies, that not being part of my culture. I spent the three days thinking how awful it was to put the kids through all this, but at the end the little one, who was about four, had stopped asking “But what HAPPENED to great granny??” and started saying “She’s in heaven now, she’s not sick any more, is she?” That began to change my mind.
I know now that when any of my inlaws die I will take part in the ceremonies, and I will handle their bodies, with respect and love because I knew them, and loved them. I won’t ask my kids to if they don’t want to, but they will be there for the entire three days, and they will be allowed to say goodbye, and be in no doubt about what happened to their beloved grandparents.
Which is a long winded way of saying, Take your kids, and let them see, while looking after them, explaining everything, and watching for signs of distress.
Good luck.