By Euler's formulas: $\sin n\theta = \dfrac{e^{in\theta}-e^{-in\theta}}{2i}$, so \begin{align} \sum_{n=1}^\infty \sin(n\theta)\,x^{n-1} &= \frac{x^{-1}}{2i} \sum_{n=1}^\infty \Big( (xe^{i\theta})^n- (xe^{-i\theta})^n \Big) \\\ &= \frac{1}{2i} \Big( \frac{e^{i\theta}}{1-xe^{i\theta}} - \frac{e^{-i\theta}}{1-xe^{-i\theta}} \Big) \end{align} (for $|x| < 1$) using the sum of two geometric series. Letting $x \to 1^-$, we get \begin{align} \frac{1}{2i} \Big( \frac{e^{i\theta}}{1-e^{i\theta}} - \frac{e^{-i\theta}}{1-e^{-i\theta}} \Big) &= \frac{1}{2i} \Big( \frac{e^{i\theta}}{1-e^{i\theta}} - \frac{1}{e^{i\theta}-1} \Big) \\\ &= \frac{1}{2i} \, \frac{1+e^{i\theta}}{1-e^{i\theta}} \\\ &= \frac{i}{2} \, \frac{e^{i\theta/2}+e^{-i\theta/2}}{e^{i\theta/2}-e^{-i\theta/2}} = \frac12 \cot \frac{\theta}{2}. \end{align}