Numerical approximation of the spectrum of self-adjoint operators in operator preconditioning