A numerical damped oscillator approach to constrained Schrödinger equations