Sorry Mooby for your loss
What is tough is the loss of a dog or friend some folks may brush off that you really are not hurting that much, friends/dogs they are there through thick and thin, they see your best and your worst; you don't pick your family but you do pick your pets and friends
SD you are right there are no magic words but just acknowledging another person's pain and empathizing with them goes a really long way
Also we will all go through it, if you live you must face death, in the ones you love and your own
So just remember this =):
https://www.youtube.com/watch?v=mA-UtwsB5w8