The same way they got rid of dead sailors back in the days of sailing ships.
By "Commiting their remains to the deep."
Only in this case, "the deep" would be deep space.
You could stuff 'em in a bag and attach them to the outside of the spacecraft. The corpse would freeze dry and keep nicely until you return to Earth.
Less creepy than keeping them on board.