How can one prove $-\arctan\left(\frac{x}{y}\right)+\pi H(y)=2\arctan\left(\frac{y}{\sqrt{x^2+y^2}+x}\right)+\frac{\pi}{2}$? How can one prove the following?
$$
-\arctan\left(\frac{x}{y}\right)+\pi H(y)=2\arctan\left(\frac{y}{\sqrt{x^2+y^2}+x}\right)+\frac{\pi}{2}$$
with $H(x)$ the Heaviside function.
I have the impression that this might follow from the following
$$H(y)=H(-x)+2H(x)H(y)-H(xy)$$
and
$$\arctan\left(\frac{x}{y}\right)+\arctan\left(\frac{y}{x}\right)=\pi H(xy)-\frac{\pi}{2}$$
but I can't quite get it right...

Using calculus  and derivatives is fast but doesn't show the simplicity of this kind of angle relationships.
Start with the case $x>0$. Then consider the following figure

If $y>0$, let the right-angled triangle $\triangle ABC$ have sides $\overline{AB} = y$ and $\overline{BC} = x$, so that
$$\alpha = \arctan \left(\frac{x}{y}\right).$$
Extend $BC$ to a segment $\overline{CD} = \overline{AC} = \sqrt{x^2+y^2}$. Thus 
$$\beta = \arctan\left(\frac{y}{\sqrt{x^2+y^2}+x}\right).$$ 
Using now the fact that $\triangle ACD$ is isosceles you easily get
$$(\alpha + \beta) + \beta = \frac{\pi}{2}$$
which gives
$$2 \arctan\left(\frac{y}{\sqrt{x^2+y^2}+x}\right) + \arctan \left(\frac{x}{y}\right) = \frac{\pi}{2},$$
that is exactly your relationship.
If $y<0$, than just use the same triangle but define $\overline{AB} = -y$ and use the symmetries
$$\alpha = \arctan \left(-\frac{x}{y}\right) = -\arctan \left(\frac{x}{y}\right),$$
and
$$\beta = \arctan\left(-\frac{y}{\sqrt{x^2+y^2}+x}\right)= -\arctan\left(\frac{y}{\sqrt{x^2+y^2}+x}\right).$$
If $x<0$ you can work with the Figure below.

Here $\overline{BC} = -x$, $\overline{AB} = |y|$, and $BC$ is extended to a segment $\overline{BD} = \sqrt{x^2+y^2} + x$. $\triangle ACD$ is isosceles and the relationship between $\alpha$ and $\beta$ is therefore
$$\beta + (\beta - \alpha) = \frac{\pi}{2}.$$
Define $\alpha$ and $\beta$ correctly, depending on the sign of $y$, and you'll get again your relationship.
$\blacksquare$
