\begin{align}
a_0 &= \frac{1}{2\pi}\int_{0}^{2\pi} \sin x \cdot \mathbf{I}_{[0,\pi]}\, dx = \frac{1}{2\pi}\int_{0}^{\pi} \sin x \, dx
= \frac{1}{\pi}\\
a_n &= \frac{2}{2\pi}\int_{0}^{2\pi} \sin x \cdot \mathbf{I}_{[0,\pi]} \cdot \cos\tfrac{2\pi n x}{2\pi}\, dx
= \frac{1}{\pi} \int_{0}^{\pi} \sin x \cdot \cos nx \, dx
= \frac{1}{\pi} \frac{\cos (\pi n) + 1}{1-n^2}\\
&= \frac{1}{\pi}\frac{1 + (-1)^n}{1-n^2}
= \begin{cases} \frac{2}{\pi}\frac{1}{1-n^2} & \text{if $n$ even}\\ 0 & \text{if $n$ odd}\end{cases}\\
b_n &= \frac{2}{2\pi}\int_{0}^{2\pi} \sin x \cdot \mathbf{I}_{[0,\pi]} \cdot \sin\tfrac{2\pi n x}{2\pi}\, dx
= \frac{1}{\pi} \int_{0}^{\pi}\sin x \cdot \sin (nx)\,dx\\
&= \frac{1}{\pi}\cdot\begin{cases}\tfrac{\pi}{2} & \text{if $n=1$}\\0 & \text{if $n>1$}\\\end{cases}
= \begin{cases}\tfrac{1}{2} & \text{if $n=1$}\\0 & \text{if $n>1$}\\\end{cases}
\end{align}
Hence the Fourier series of $f(x)$ over $(0,2\pi)$ is given by
\begin{align}
f(x) &\sim
a_0+\sum_{n=1}^{\infty}\left [a_n \cos (nx) + b_n\sin(nx)\right]\\
&= \frac{1}{\pi} + \sum_{n=1}^{\infty}\frac{2}{\pi}\frac{1}{1-(2n)^2}\cos((2n)x) + \frac{1}{2}\sin((1)x)\\
&= \frac{1}{\pi} + \frac{2}{\pi}\sum_{n=1}^{\infty}\frac{\cos(2nx)}{1-4n^2} + \frac{1}{2}\sin(x)
\end{align}
Plotted with 20 terms using Wolfram Alpha:
Note
I used Wolfram Alpha to compute these integrals, but it skipped the special case of $b_1$. This is likely to do with a symbolic division that implicitly assumed $n\neq 1$. Either way, this special case follows near-directly from the principle of orthogonality, i.e.,
$$
\frac{1}{\pi}\int_0^{2\pi} \sin(nx)\sin(mx)\,dx = \begin{cases}1 &\text{if $n=m$}\\
0 & \text{if $n\neq m$}\end{cases}
$$
So in our case, $$\frac{1}{\pi} \int_0^{2\pi} \sin(x)\mathbf{I}_{(0,\pi)}\sin(nx)\,dx
= \frac{1}{\pi} \begin{cases} \int_0^{\pi} \sin(x)^2\,dx & \text{for $n=1$}\\
\int_0^{\pi} \sin(x)\sin(nx)\,dx & \text{for $n>1$}\end{cases}$$
This latter point highlights why I knew that Wolfram Alpha hadn't given me everything,
$$\int_{0}^a \sin(x)^2 \,dx > 0,\quad\text{for $a>0$}$$
so we wouldn't expect the corresponding coefficient to be zero. If, on the other hand, the function were something like $f(x)=\sin(5x)\cdot \mathbf{I}_{(0,\pi)}$ or $f(x)=\cos(2x)\cdot \mathbf{I}_{(0,\pi)}$, then we'd know to check $b_5$ or $a_2$ respectively.
If you have learned about vector spaces, then you can think of the integral as an dot (inner) product over vectors $1, \sin(nx),\cos(nx)$ for $n=1,\dotsc,\infty$. The inner product measures similarity. In this case we are asking about amount of "$sin(x)$"-ness if we take a $\sin(x)$ function and lop off the latter half. The answer, perhaps unsurprisingly, is a half.
Best Answer
We presume the following form for the Fourier series of $f$: $$\frac{a_0}{2} + \sum_{n=1}^{\infty}a_n \cos(nx) + \sum_{n=1}^{\infty}b_n \sin(nx)$$ where $$a_n = \frac{1}{\pi}\int_{-\pi}^{\pi}f(x) \cos(nx) dx$$ We intend to evaluate the Fourier series only at $x=0$, so we do not care about the $b_n$ coefficients because $\sin(nx) = 0$ when $x=0$. As $$f(x) = \begin{cases} 0 & \text{if } -\pi \leq x < 0 \\ x & \text{if } 0 \leq x < \pi \\ \end{cases}$$ we have $$a_n = \frac{1}{\pi}\int_0^{\pi}x\cos(nx) dx$$ For $n = 0$, this becomes $$a_0 = \frac{1}{\pi}\int_0^{\pi}x dx = \frac{1}{2\pi}(\pi^2 - 0) = \frac{\pi}{2}$$ For $n \neq 0$, we can use integration by parts, with $u = x$ and $dv = \cos(nx) dx$: $$\begin{aligned} \pi a_n &= \left.\frac{1}{n}x\sin(nx)\right|_{0}^{\pi} - \frac{1}{n}\int_0^{\pi}\sin(nx) dx \\ &= \frac{\pi}{n} \sin(n\pi) + \frac{1}{n^2}(\cos(n\pi) - 1) \\ &= \frac{1}{n^2}(\cos(n\pi) - 1) \end{aligned}$$ where we have used that $\sin(n\pi) = 0$ when $n$ is an integer.
For even $n$, we have $\cos(n\pi) = 1$, so $$a_n = \frac{1}{\pi n^2}(1 - 1) = 0$$ For odd $n$, we have $\cos(n\pi) = -1$, so $$a_n = \frac{1}{\pi n^2}(-1 - 1) = -\frac{2}{\pi n^2}$$ This means that the Fourier series for $f$ is (ignoring the sine terms) $$\begin{aligned} \frac{a_0}{2} + \sum_{n=1}^{\infty}a_n \cos(nx) &= \frac{\pi}{4} + \sum_{m=1}^{\infty}a_{2m-1} \cos((2m-1)x) \\ &= \frac{\pi}{4} - \sum_{m=1}^{\infty}\frac{2}{\pi(2m-1)^2}\cos((2m-1)x) \\ \end{aligned}$$ Plugging in $x=0$, we have $\cos((2m-1)0) = 1$ for all $m$, so we end up with $$0 = f(0) = \frac{\pi}{4} - \sum_{m=1}^{\infty}\frac{2}{\pi(2m-1)^2}$$ assuming we can justify that the Fourier series converges to the original function at $x=0$ (e.g. this is true because $f$ is continuous and has bounded variation). This allows us to conclude that $$\sum_{m=1}^{\infty}\frac{2}{(2m-1)^2} = \frac{\pi^2}{4}$$