  Inspirals of stellar-mass compact objects into massive black holes, known as
extreme mass ratio inspirals (EMRIs), are one of the key targets for upcoming
space-based gravitational-wave detectors. In this paper we take the first steps
needed to systematically incorporate the effect of external gravitating matter
on EMRIs. We model the inspiral as taking place in the field of a Schwarzschild
black hole perturbed by the gravitational field of a far axisymmetric
distribution of mass enclosing the system. We take into account the redshift,
frame-dragging, and quadrupolar tide caused by the enclosing matter, thus
incorporating all effects to inverse third order of the characteristic distance
of the enclosing mass. Then, we use canonical perturbation theory to obtain the
action-angle coordinates and Hamiltonian for mildly eccentric precessing
test-particle orbits in this background. Finally, we use this to efficiently
compute mildly eccentric inspirals in this field and document their properties.
This work shows the advantages of canonical perturbation theory for the
modeling EMRIs, especially in the cases when the background deviates from the
standard black hole fields.
