What I was trying to point out is that
So the function f is actually continuous moreover it actually infinity differentiable there. They key idea is that the function can be extended to be defined at 0.
The 2nd point is the series should sum to 0 at 0 right. So when we evaluate the series at zero we get 0. So the series does not care that the function was defined piecewise because of the continuous(analytic) extension. Maybe a plot of the function would help.