A New Quantum Formalism for Damping and Gain in Harmonic Oscillators