Proposition (Fourier coefficients of the derivative)
Let $f\in \R\to\C$ be $L$-periodic. Suppose $f$ restricted to $(0,L)$ is continuously differentiable and the derivative is bounded.
Then the complex Fourier coefficients of $g:=f'$ are $$ \begin{align*} \hat g_n = \frac{f(L_-) - f(0_+)}{L} + \frac{2\pi i n}{L} \hat f_n. \end{align*} $$ In particular, if $f$ is continuous, then $\hat g_n = (2\pi i n/L) \hat f_n$, which is what you obtain from term-wise differentiation of the Fourier series.