The spectral density operator $hat{rho}(omega)=delta(omega-hat{H})$ plays a central role in linear response theory as its expectation value, the dynamical response function, can be used to compute scattering cross-sections. In this work, we describe a near optimal quantum algorithm providing an approximation to the spectral density with energy resolution $Delta$ and error $epsilon$ using $mathcal{O}left(sqrt{logleft(1/epsilonright)left(logleft(1/Deltaright)+logleft(1/epsilonright)right)}/Deltaright)$ operations. This is achieved without using expensive approximations to the time-evolution operator but exploiting instead qubitization to implement an approximate Gaussian Integral Transform (GIT) of the spectral density. We also describe appropriate error metrics to assess the quality of spectral function approximations more generally.