My dog went into mourning for a while after my mom died. He would sit by the picture window for hours waiting for her to come home (like he used to do when she went out on walks.)
Dogs know a dead body when they see/smell it, so when a person or another dog/pet dies in the family, it's important to let them actually see/smell/say goodbye to the person or other dog/pet. That way they know what happened and can process it, and they aren't confused and waiting by the door for the person/other dog/pet to come home. This doesn't mean they won't also grieve, but at least they know the person/pet died, not just that they are lost or gone for a long time.