In calculating the time evolution of a quantum system, I encountered an integral similar to $$\lim_{T\to \infty} \frac{\int_{0}^{T} dt e^{i\omega t}}{T}.$$ What is its value? The double integral of interest also involves integration over the independent variable $\omega$, with the integral of interest being $$\int d\omega\left[\lim_{T\to \infty} \frac{\int_{0}^{T} dt e^{i\omega t}}{T}\right] f(\omega)d\omega,$$ where $f(\omega)$ is some function of $\omega$ and the the interval of integration over $\omega$ is assumed, in general, to be $-\omega_0$ to $\infty$, where $0<\omega_0$ is a positive constant.
My understanding is that $$\lim_{T\to \infty}\int_{0}^{T} dt e^{i\omega t}=\pi\delta(\omega)+iP\{\frac{1}{\omega}\}$$ where $P$ gives value of the Cauchy principle. However the physical intuition behind taking the the limit on dividing the above expression by $T$ is unclear.
Looking at the first integral, you will notice that it stays bounded for arbitrarily large $T$, as $e^{i\omega t}$ oscillates evenly around 0. So for $\omega \in \mathbb{R} \backslash \{0\}$ the expression will vanish in the limit $T \rightarrow \infty$.
The only special case to consider is $\omega = 0$, in which case the integral does not stay bounded, but rather evaluates to $T$. Therefore (let's give it a name) $$ g(\omega):=\lim_{T\rightarrow\infty} \frac{\int_0^T e^{i\omega t}dt}{T} = \cases{1\quad\omega = 0\\0\quad\text{otherwise}} $$ assuming $\omega\in\mathbb{R}$.
Because $g(\omega)$ only has support at $\omega = 0$, the integral $$ \int g(\omega)f(\omega)d\omega $$ will vanish if $f(\omega)$ is a regular function. If $f(\omega)$ is a distribution, it might evaluate to some finite value.