The energy spectrum and the wave functions of an electron in a quantum dot (QD) are computed using the effective-mass approximation. The case of a shallow, hydrogenlike center in a quantum dot is also considered. We use the spherical shape approximation in the belief that the basic results are more sensitive to the dimensions than to the shape of the confining potential. The wave functions for the discrete bound states and for the continuum states are obtained in a closed form. We show that resonances of the Breit-Wigner type occur in the continuum, due to the local potential of the microstructures. The lifetimes of the resonant states are computed and their impact on the optical properties of the QD material is discussed. As an example, we give detailed results for the GaAs/Ga 1− x Al x As QD, where the basic properties (band mismatch, effective masses, dielectric constants) are well known. We find that the optical excitation spectrum, with or without the impurity center, depends dramatically on the dot radius.© 1996 The American Physical Society.