What is the distributional limit of $$\lim_{N\to\infty} \sum_{n=0}^N e^{inx} \; ?$$
If the summation is over $-N$ to $N$, the answer is $\sum_{m\in\mathbb Z}2\pi \delta(x-2\pi m)$, but what about the above one?
Naive guess: If the sum is replaced by an integral, we know $$\lim_{N\to\infty} \int_0^N e^{ikx} dk = \frac{i}{x+i0}.$$ However, since $\sum_{n=0}^N e^{inx}$ should be $2\pi$-periodic, a plausible answer could be $$\frac{i}{\sin x+ i0}.$$
$\sum_{n=1}^\infty e^{inx}$ is the (distributional) derivative of $$\sum_{n=1}^\infty\frac{e^{inx}}{in}=s(x)+i\ell(x),\quad\ell(x)=\log\left|2\sin\frac{x}{2}\right|,\quad \begin{cases}s(x)=(\pi-x)/2,&0<x<2\pi\\s(x+2\pi)=s(x),&\text{otherwise}\end{cases}.$$ The derivative of $s(x)$ is $-1/2+\pi\sum_{n\in\mathbb{Z}}\delta(x-2n\pi)$, and the derivative of $\ell(x)$ is what may be called "the principal value of $(1/2)\cot(x/2)$", analogous to the case of $1/x$.