If you do die in space your body won’t decompose in the normal way it does here on Earth since there is no oxygen, and without oxygen the normal bacterial and fungal decomposition can’t happen.
There will be some chemical breakdown of cellular material, but that will be limited and likely not visible other than as a discoloration.
Read Also: Does The Moon Emit Light?
If you were near a source of heat your body would mummify; if you weren’t, it would freeze solid. If your body was sealed in a space suit it would start to decompose, but only for as long as the oxygen supply lasted, at which point the bacteria and fungi responsible would die.
Whichever though, your body would last for a very long time in the vacuum of space where there’s no air to facilitate weathering and degradation. Your corpse could drift through the galaxy for millions of years.