I can't see anything wrong here. If you want to be really certain, here's some options.
Integrating argtan and plugging in the appropriate limits we get:
You could at this point just pick some representative values of x, plug them into f(x) above, and plug them into the series you obtained (evaluated over, say, the first few thousand terms) to see if you get roughly the same values. Even better, you can plot f(x) and plot your series (again, really a truncated version of your series) to see if the plots line up.
Alternatively, we know that and . Plug these into the f(x) above and I think you'll arrive at the same answer you got.