The computational scheme and calculation results of bound, metastable and Rydberg states of atomic and molecular systems important for laser spectroscopy are presented. The solution to the problem is performed using the authors' software package (see program libraries of the Computer Physics Communications journal and of the Joint Institute for Nuclear Research) that implement the high-accuracy finite element method. The FORTRAN procedure of matching tabulated potential functions with van der Waals asymptotic potential using interpolation Hermite polynomials which provides continuity of both the function itself and its derivative is presented. The efficiency of the proposed approach is demonstrated by calculated for the first time sharp metastable states with complex eigen-energies in a diatomic beryllium molecule and weakly bound Rydberg states of antiprotonic helium atom. © 2020 SPIE.