Anticipatory grief of a pet

I know this has nothing to do with periods or relationships, but I’m just wondering if anyone else has experienced this.

My dog is 14 years old, he’s a sweetheart and my best friend. These past few days his two back legs have been super weak, his liver enzymes came back slightly abnormal, his kidneys and heart very healthy, he’s extremely out of it and keeps shaking, he will eventually eat but not all of his food.

I’ve been really worried and crying a lot. Idk what’s going to happen in these next few days and I’m not gonna be home for it. It’s breaking my heart and I already feel like I’m grieving. Has anyone dealt with this? Idk how I could live with him. Half of my heart will be ripped away from me.