A Krein-like Formula for Singular Perturbations of Self-Adjoint Operators and Applications