@Mommyof2,
Was this child a school mate of your son's? If so, will the school be offering any grief counseling to the children? It might be helpful if the children could deal with their feelings as a group.
At any age it is hard to deal with the sudden tragic death of a friend. And I think it is particularly difficult for a child to deal with the death of another child.
Encourage him to talk about what he is feeling. Just listening to your son, and responding as candidly as you can to any of his questions, would be very helpful. He may be experiencing a swirl of emotions (grief, anxiety, anger) which are very confusing for him. Let him know that you understand what he is feeling, and reassure him that whatever he is feeling is normal at a time like this. Share your own feelings with him if you can. Offer him any comfort or support he seems to need. The process of grieving takes time, allow him to deal with this event at his own pace.
If he is interested, perhaps you could encourage your son your son to write down some things about his friend--things they enjoyed doing together, what he remembers most about his friend, what he liked about him. He could put these in a little homemade memory book, perhaps with a photo of his friend if he has one. Then he will always have a special keepsake he can look at which will always hold good memories of his friend.
If he wishes to attend the funeral, allow him to do so. If he has never been to a funeral before, answer any questions he might have beforehand. If he doesn't want to attend, that is all right.
It might be helpful for you to speak with some other parents whose children were friends with the child who died. You can find out how their children are coping, and how they are handling the situation. You might all be able to offer each other some guidance and support.
This is a difficult time for your son, and for you as well. I think we all feel inadequate when trying to help someone deal with a significant loss. Just being there for your child, listening to him, comforting him, and being open with him, will help him cope.