$\newcommand{\ac}{\operatorname{arccot}}$ Here is my proof:
$ \theta = \ac(x)$
$ \cot \theta = x $
$ \displaystyle \tan \theta = \frac{1}{\cot \theta} = \frac{1}{x}$
$ \displaystyle \theta = \arctan \frac{1}{x}$
But based on the graph, $\ac(x) = \arctan(\frac{1}{x})$ is only satisfied when $ x > 0$. What is wrong with my proof? What is the error occurred inside a proof?

There are two conventions for principal value:
See https://mathworld.wolfram.com/InverseCotangent.html
It turns out that $\operatorname{arccot} x = \arctan(1/x)$ for all $x\ne 0$ for one convention of principal value.
If you want to adapt or enforce a particular range for $\operatorname{arccot} x$, then $\operatorname{arccot} x = \arctan(1/x) + k \pi$ for some integer $k$.
Here is what Mathematica thinks:
You can rotate this second plot $90^\circ$ and define your range anyway you want up to a multiple of $\pi.$