Optical femtosecond pump-probe experiments allow to measure the dynamics of ultrafast heating of metals with high accuracy. However, the theoretical analysis of such experiments is often complicated because of the indirect connection of the measured signal and the desired temperature transients. Establishing such a connection requires an accurate model of the optical constants of a metal, depending on both the electron temperature Te and the lattice temperature Tl. In this paper, we present first-principles simulations of the two-temperature scenario with Te ≫ Tl, showing the optical response of hot electrons to laser irradiation in gold and ruthenium. Comparing our simulations with the Kubo-Greenwood approach, we discuss the influence of electron-phonon and electron-electron scattering on the intraband contribution to optical constants. Applying the simulated optical constants to the analysis of ultrafast heating of ruthenium thin films we highlight the importance of the latter scattering channel to understand the measured heating dynamics.