What is the periodic generalized function $f \in \mathcal{S}'(\mathbb{T})$ such that (convergence in $\mathcal{S}'(\mathbb{T})$) \begin{equation} f(x) = \sum_{n\geq 0} c_n(f) \mathrm{e}^{\mathrm{i} n x} \end{equation} with $c_n(f) = 1$ for $n\geq 0$ and $c_n(f) = -1$ otherwise?
This is somehow the periodic counterpart of the Fourier transform of the Heaviside function (up to an additive constant) but I could not find a formula.
Well, you are dealing with $$ 1 + 2i\sum_{n\geq 1}\sin(nx) $$ which converges in distribution to
$$ 1+i\cot(x/2). $$