  For a connected reductive group $G$ and an affine smooth $G$-variety $X$ over
the complex numbers, the localization functor takes $\mathfrak{g}$-modules to
$D_X$-modules. We extend this construction to an equivariant and derived
setting using the formalism of h-complexes due to Beilinson-Ginzburg, and show
that the localizations of Harish-Chandra $(\mathfrak{g}, K)$-modules onto $X =
H \backslash G$ have regular holonomic cohomologies when $H, K \subset G$ are
both spherical reductive subgroups. The relative Lie algebra homologies and
$\mathrm{Ext}$-branching spaces for $(\mathfrak{g}, K)$-modules are interpreted
geometrically in terms of equivariant derived localizations. As direct
consequences, we show that they are finite-dimensional under the same
assumptions, and relate Euler-Poincar\'e characteristics to local index
theorem; this recovers parts of the recent results of M. Kitagawa. Examples and
discussions on the relation to Schwartz homologies are also included.
