When we spent a lot of time with a person, and care deeply for them, they become part of ourselves, encoded into our brains. If we lose that person, the brain has to rewire itself to recognize and predict a world without that person in it—an intensive task that helps to explain some of the most painful aspects of grief.

You can read more about it here, on Psychology Today