The method of complex absorbing potential (CAP) is used in the development of a variational principle to compute the complex poles of resonance states. The method allows the direct use of a square-integrable basis without explicitly imposing the Siegert resonant boundary conditions. The principle is first tested in a potential scattering problem. Results for the test calculations are in excellent agreement with the available results in the literature. The feasibility and the accuracy of the technique are demonstrated by the calculations of Stark widths and shifts for the ground state H atom in weak and strong external DC electric fields.