On the thermodynamics of quantum-electrodynamic frequency shifts