Collective two-photon processes in the presence of a thermal electromagnetic field