Suppose we have a damped driven harmonic oscillator governed by the following equation of motion: $$\ddot \phi(t) + 2 \beta \dot \phi(t) + \omega_0^2 \phi(t) = J(t) \, .$$ In the case that $J(t) = A \cos(\Omega t)$, we can show that $$\phi(t) = \text{Re} \left[e^{i \Omega t} \underbrace{\frac{-A}{\Omega^2 - \omega_0^2 - i 2 \beta \Omega}}_\text{response function} \right] \, . $$ As explained in this other question, we define the resonance frequency as the frequency where power flows only into the oscillator, which happens when the response function is purely imaginary. That's because when the response function is imaginary, the drive and the oscillator position are 90 degrees out of phase so the drive and oscillator speed are in phase and so the work done is always positive. The response function is imaginary when $\Omega = \omega_0$.
How do we define the oscillator's linewidth?