Thermal emission in the ultrastrong-coupling regime