\[\mathrm{g}\left(z\right)=\int_{0}^{\infty}\frac{\cos t}{t+z}\,\mathrm{d}t=\int%
_{0}^{\infty}\frac{te^{-zt}}{t^{2}+1}\,\mathrm{d}t.\]