I'm so sorry to hear that, when I was 17 my cat that I'd had for 15 years (since I was just 2) passed. It's really crushing and it truly does feel like losing a
very close member of your family. Take comfort in knowing that your beloved doggy lived a LONG life. This is something that helped me cope with the loss of my kitty. It makes it slightly less tragic when they are taken from us at an elderly age. Maybe? Anyway, it'll get better. I promise.
BTW- Don't let this derail your weight loss efforts. If you want your weight loss to be permanent, you'll have to accept that, throughout your life, you will encounter hardships. You must be able to get through them without using food as a crutch. I know that you can do it.
Good luck!