Are you thinking of thermal radiation? And what does losing mass have to do with cooling down?
We observe redshift in the spectrum. Hydrogen emits radiation in very specific frequencies, which are redshifted. This cannot be explained by losing mass, heat or energy.
Basically, cooling down is the same thing as moving farther away from an inertial reference point.