I would like to know when we can intertwine the integrale with an infinite sum?
Precisely, I would like to compute this integral
$$\int_{0}^{2\pi}\sum_{k=n}^{\infty}e^{ik\theta}d\theta$$
We can write: $$\int_{0}^{2\pi}\sum_{k=n}^{\infty}e^{ik\theta}d\theta=\int_{0}^{2\pi}\lim_{m\to \infty}\sum_{k=n}^{m}e^{ik\theta}d\theta$$
Let $f_m(\theta)=\sum_{k=n}^{m}e^{ik\theta}$ then $f_m$ converges to $\sum_{k=n}^{\infty}e^{ik\theta}$ and $$\lvert f_m(\theta)\rvert \leq \sum_{k=n}^{m} \lvert e^{ik\theta} \rvert= \sum_{k=n}^{m} \lvert e^{kIm(\theta)} \rvert $$
Can we apply the dominated convergence theorem?
You are starting with this expression: $$\int_{0}^{2\pi}\sum_{k=n}^{\infty}e^{ik\theta}d\theta$$ The way it's written, it only makes sense if $$\sum_{k=n}^{\infty}e^{ik\theta}$$ is defined. But that is an infinite sum whose terms do not approach $0$, so that sum/limit does not exist. So the original expression doesn't have a value in the first place.