We develop a dynamic mean-field theory for polar active particles that interact through a self-generated field, in particular one generated through emitting a chemical signal. While being a form of chemotactic response, it is different from conventional chemotaxis in that particles discontinuously change their motility when the local concentration surpasses a threshold. The resulting coupled equations for density and polarization are linear and can be solved analytically for simple geometries, yielding inhomogeneous density profiles. Specifically, here we consider a planar and circular interface. Our theory thus explains the observed coexistence of dense aggregates with an active gas. There are, however, differences to the more conventional picture of liquid-gas coexistence based on a free energy, most notably the absence of a critical point. We corroborate our analytical predictions by numerical simulations of active particles under confinement and interacting through volume exclusion. Excellent quantitative agreement is reached through an effective translational diffusion coefficient. We finally show that an additional response to the chemical gradient direction is sufficient to induce vortex clusters. Our results pave the way to engineer motility responses in order to achieve aggregation and collective behavior even at unfavorable conditions.