Necessary and sufficient damping in a second-order oscillator