Yeah, as cruel as it is, you need to keep the body onboard.
A mate of mine once had the Owner die on a transatlantic from an undiagnosed abdominal something. The professional crew had tried both antibiotics and painkillers, but he just got worse and finally died.
Phil said that when the Owner finally departed, they all sat in the
cockpit crying and smoking (only one of them smoked), then they wrapped the body in a space blanket, "rechristened" it Oscar and secured it on
deck behind the
helm. Then they used frozen items from the
freezer in rotation (they kept refreezing them, so those
food items were a toss) to pile around Oscar to keep him relatively cold until they got to land.
Fortunately (although un-fortunately for the wife), she was onboard and was able to corroborate
events once they got into port, so there was no suspicion of nefarious cause of death.
Phil said after they'd got Oscar wrapped, secured and had fallen into the routine of rotating frozen goods, the only freaky thing was having a dead body behind you while helming/standing watch at night. They got over this as well, by greeting and saying goodnight to Oscar at change of watch.
Sorry if this is rather macabre and gruesome, but it ain't fiction.
LW77