Some dogs would lay by the side of your dead body and mourn until they died themselves. Documented instances of that.
Some dogs would end up eating your body if they had no option, such as being shut up in a house with your remains for a lengthy period of time. Documented instances of that, too.
It’s fairly breed specific, I’d think, as to what sort of behavior a dog would exhibit upon your passing. My late Walker Hound girl would mourn herself to death, she loved me so it was painful to watch sometimes. Hounds have their downsides but love and dedication beyond all reason to their people isn’t one of them.
My border collies would not eat me.
However, they should, and while they are easy to train, I’m not quite sure how I would train them to have me for dinner.