Solution (source code)

= Solution

The Fourier-space <cosmological Poisson equation> gives
$$
\phi(\mathbf k,\tau)
=-\frac{4\pi Ga^2\bar\rho_m}{k^2}\delta_m
=-\frac{3\Omega_{m,0}H_0^2}{2ak^2}\delta_m.
$$
Insert this into the line-of-sight expression for the <CMB lensing potential>, Fourier transform $\delta_m$, and use the <Rayleigh plane-wave expansion>. Projection onto $Y_{lm}$ and spherical-harmonic orthogonality give
$$
\boxed{
a_{lm}^\psi=12\pi\Omega_{m,0}H_0^2i^{-l}
\int_0^{\chi_e}d\chi
\int\frac{d^3k}{(2\pi)^3}
\frac1{k^2}\frac{\chi_e-\chi}{\chi\chi_e}
\frac{\delta_m(\mathbf k,\tau)}{a(\tau)}
j_l(k\chi)Y_{lm}^*(\widehat{\mathbf k})}.
$$