How do I rewrite a Hamiltonian written as some integral over momenta, e.g., $$ H = \int\frac{d^d \vec k}{(2\pi)^d}\omega(\vec k) a_{\vec k}^\dagger a_{\vec k} $$ in terms of energy eigenmodes?
That is, what's the function $f$, the cutoff $\omega_c$ and what are the modes $a_\omega$ in the following formula: $$ H = \int_0^{\omega_c}f(\omega) a_\omega^\dagger a_\omega.$$
Maybe this can't be done in most cases -- the problem is that $\omega(\vec k)=\omega_0$ is not invertible. So in addition to the integral over $\omega$ there needs to be a sum or an integral over all the states with the same frequency. But I'm mostly interested in cases where it works.
I know about substitution of variables, but I'm unsure how the operators transform. Can $f(\omega)$ be anything and $a_\omega$ still fulfil canonical commutation relations? Mostly thinking about bosons, but shouldn't be very different for fermions I assume.