I would let your son decide.
My daughter (was a few months prior to her 9th birthday at the time) lost one of her good friends at school last spring. She had only known her at school for the one year, as my daughter just started at that school, but they were pretty good pals in class and on the playground.
She was in a car accident with her mother and several other relatives. She and her mother were the only survivors and were in ICU for weeks. After about the 3rd week, she passed away.
It was extremely tough on the kids and the school brought in grief counselors on the day they told the class. Fortunately, I had been in communication with my daughter's teacher, and she sent me an e-mail to let me know she had passed (it happened late in the day and the kids were not told at school until the next day). I was able to tell my daughter myself, at home that night before the kids at school were told. It was awful. She screamed and cried and grieved. We both did. The funeral arrangements were not made until a few days later, and it was about a week and a half later. During the interim, the school held a fund raiser (pay $.50 to wear a hat at school - "hat day") to help the family, as they were now paying for a 3rd funeral, and the mom was still in ICU. My daughter made a poster for it, and asked if she could give more than the 50 cents. She was upset the day of "hat day" because she almost forgot to wear her hat.
I told her when the funeral was, and asked her if she wanted to go. She did. So, we put on our best, and went. She chose a special hairband to wear, because it looked like a pompom and her friend had always liked it. I was a little worried when we got there b/c they had an open casket. I let my daughter know that she did not have to go down and view, we could just sit in the pews. But if she wanted to, I would walk down with her so she could look. She wanted to see her friend. So we went and viewed the body. Then took our seats. She was a trooper, and didn't cry at the funeral, though I couldn't help it myself.
She cried a few nights at home. One night I found her on her bed red-eyed and nose running, gripping the service bulletin from the funeral.
None of her grief would have been less, if she had not gone to the funeral. I think it helped her to accept that her friend was gone. It was hard. So very hard. Not the funeral so much, but knowing her friend was gone. But kids can really surprise you with how they deal with things. I don't think there is anything to be gained from avoiding funerals with children. Death is part of life.
My kids have been to other funerals before. Their great grandma, whom they probably only have very very faint memories of, they went to her funeral. A very kind lady from church died unexpectedly, and my son (who was 9 at the time) asked if they would be allowed to miss school, because he wanted to go to her funeral. And it wasn't to skip school, I promise. He loved school.
If your child has never been to a funeral before, talk to him about what to expect. Let him know that it is okay to cry, too. Let him lead you about what to do or how to deal with this loss. You might be surprised by him.
I'm sorry for your loss.