I remember reading this post once, where a child mused, upon the death of his dog, that the reason we outlive animals is because living, hopefully, is about becoming good and doing good unto others. And, since animals as a whole are so good, they don't need as much time to do so. It always hurts when someone leaves, there's no denying that. But I've found that once the mourning's done, the best way to make peace is to remember the good times rather than obsess over the absence.
(Get this post was from 2014 but there's no such thing as an expiration date on positive thinking, I guess.)