Let's look at $f(x)=\cos(x)$ defined on the interval $[0,\pi]$.
We know that for any function $g$ defined on $[0,\pi]$ we have:
$g(x)=\sum_{k=1}^{\infty}B_k\sin(kx)$ where $B_k=\frac{2}{\pi}\int_{0}^{\pi}g(x)\sin(kx)dx$. And $f$ is no different. So in our case:
$B_k=\frac{2}{\pi}\int_{0}^{\pi}f(x)\sin(kx)dx=\frac{2}{\pi}\int_{0}^{\pi}\cos(x)\sin(kx)dx$
It can be shown that $\int\cos(x)\sin(kx)dx=\frac{\sin(x)\sin(kx)+k\cos(x)\cos(kx)}{1-k^2}$, so:
$B_k=\frac{2}{\pi}\int_{0}^{\pi}\cos(x)\sin(kx)dx=\frac{2}{\pi}\frac{-k\cos(k\pi)-k}{1-k^2}=\frac{2}{\pi}\frac{(-1)^{k+1}k-k}{1-k^2}$
So overall we should have $f(x)=\cos(x)=\sum_{k=1}^{\infty}\frac{2}{\pi}\frac{(-1)^{k+1}k-k}{1-k^2}\sin(kx)$ But that clearly can't be true, because $\cos(0)=1$ but that sum is equal to $0$ at $x=0$ since $\sin(0)=0$.
Where is the mistake? and not only that, we seem to have a big problem when $k=1$
Developing a sine series makes an odd periodic extension of the function. So a better question would be, which zero are you talking about? You have a discontinuity at $0$, so it depends on which side you approach from: $$f(0^+)=1$$ and $$f(0^-)=-1$$
The fourier series, when faced with a discontinuity, gives you an average value at the point of discontinuity (Dirichlet theorem) plus Gibbs oscillations around it.
So, your series is ok, it's just that your function is ugly.