Consider the following erroneous computation:
\begin{align*}
\log 2
&=1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots\\
&=\left(1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\cdots\right)
-2\left(\frac{1}{2}+\frac{1}{4}+\cdots\right)\\
&=0.\end{align*}
This mistake is in spirit the same as what you did in your computation.
Here is one possible computation. Fix $ R > 0$ and introduce
$$ I_1 = I_1(R) = \int_{0}^{R} \frac{\arctan (x)}{x} \, dx, \qquad I_2 = I_2(R) = \int_{0}^{R} \frac{\arctan (2x)}{x} \, dx. $$
Using the substitution $2x \mapsto x$, we have
$$ I_2 = \int_{0}^{2R} \frac{\arctan x}{x} \, dx $$
and hence
$$ I_1 - I_2
= -\int_{R}^{2R} \frac{\arctan x}{x} \, dx
\stackrel{(x=Rt)}{=} -\int_{1}^{2} \frac{\arctan(Rt)}{t} \, dt. $$
So taking $R \to \infty$, we have
$$ \int_{0}^{\infty} \frac{\arctan x - \arctan (2x)}{x} \, dx
= -\int_{1}^{2} \frac{\pi/2}{x} \, dx
= -\frac{\pi}{2}\log 2. $$
(Remark. Of course, interchanging the limit and the integral is in general now allowed. In our case, this is easily justified by the following inequality
$$ \frac{\pi}{2}\arctan(R)
\leq \int_{1}^{2} \frac{\arctan(Rt)}{t} \, dt
\leq \frac{\pi}{2}\arctan(2R). $$
Applying the squeezing lemma indeed establishes the desired convergence.)