  The regularized method of analytic continuation is used to study the
low-energy negative ion states of beryllium (configuration 2$s^2\varepsilon p\;
^2P$) and magnesium (configuration 3$s^2\varepsilon p\; ^2P$) atoms. The method
applies an additional perturbation potential and it requires only routine
bound-state multi-electron quantum calculations. Such computations are
accessible by most of the free or commercial quantum chemistry software
available for atoms and molecules. The perturbation potential is implemented as
a spherical Gaussian function with a fixed width. Stability of the analytic
continuation technique with respect to the width and with respect to the input
range of electron affinities is studied in detail. The computed resonance
parameters $E_r$=0.282 eV, $\Gamma$=0.316 eV for the $2p$ state of Be$^-$ and
$E_r$=0.188 eV, $\Gamma$=0.167 for the $3p$ state of Mg$^-$, agree well with
the best results obtained by much more elaborated and computationally demanding
present-day methods.
