Generally, you can test whether or not a function of two variables can be considered a real/imaginary part by whether or not it is harmonic, i.e. it is in fact (locally) part of an analytic function if and only if $ \Delta v = v_{xx} + v_{yy} = 0 $. If you happen to know for a fact that $ v $ is harmonic, then you can solve for $ u $ with Milne's method: Write $ f = u + i v$, then $ f' = u_x + i v_x $, and by Cauchy-Riemann we can substitute $ v_y $ for $ u_x$, yielding $ f' = v_y + i v_x $; write the latter expression as a function of the complex variable $ z = x+iy $ in order to find $ f'(z) $ in a useful form; finally integrate to obtain $ f(z) $ up to a constant and then subtract out the imaginary part $ i v $ in order to obtain the real part $ u $ left over.
In this case $ \Delta \left( 78 +x^2 - 5y^2 - \frac{5y}{x^2+y^2} \right) = -8 \ne 0 $, so your function cannot be the real or imaginary part of any analytic function. Note that you can't hold $ y $ fixed while taking a partial derivative with respect to $ y $ so your method of deduction is invalid.
Here is one way to make the connection you are hinting at more rigorous. Throughout this answer, $\log$ denotes only the real logarithm (defined for positive real numbers only, so there is no ambiguity in how it is interpreted).
Recall that
$$
|e^w| = e^{\operatorname{Re} w}, \qquad w \in \mathbb{C}.
$$
If there were an annulus $A$ centered at $0$ and an function $g$ on $A$ with the property that
$$
\operatorname{Re} g(z) = \log |z|, \qquad z \in A,
$$
then the function $h$ on $A$ given by $h(z) = e^{g(z)}/z$ for all $z \in A$ would be analytic on $A$ and would satisfy
$$
|h(z)| = \frac{|e^{g(z)}|}{|z|} = \frac{e^{\operatorname{Re} g(z)}}{|z|} = \frac{e^{\log |z|}}{|z|} = 1, \qquad z \in A.
$$
It would follow from this that
$$
\overline{h(z)} = \frac{|h(z)|^2}{h(z)} = \frac{1}{h(z)},
$$
being a quotient of analytic functions, is also analytic on $A$.
It easily follows from the Cauchy-Riemann equations that $h$ must be constant on $A$ (generally, whenever both a function and its complex conjugate are analytic on a connected open set, the function must be constant on that set).
So there is $\omega \in \mathbb{C}$ with $|\omega| = 1$ and
$$
e^{g(z)} = \omega z, \qquad z \in A.
$$
Choosing a real number $s$ with $\omega = e^{is}$ it follows that the function analytic $L$ on $A$ given by $L(z) = e^{g(z) - is}$ satisfies
$$
e^{L(z)} = z, \qquad z \in A.
$$
To summarize: beginning with an analytic function having $\log |z|$ as its real part on $A$, we have constructed an analytic branch of the logarithm on $A$. So if we happen to know that no such thing exists, we have our contradiction, and are done.
It is, of course, generally true that if $g$ and $k$ are analytic functions on a connected open set $G$ and $\operatorname{Re} g(z) = \operatorname{Re} k(z)$ holds for all $z \in G$, then there must be a real constant $C$ with $g(z) = k(z) + iC$. (Proof: consider the Cauchy-Riemann equations for the difference $g - k$ to deduce that $g - k$ must be constant, and clearly the constant must have zero real part.) So the intuition that an analytic function having $\log |z|$ as its real part must be "essentially the same thing" as a branch of the logarithm is correct. But in translating this intuition into a nonexistence proof, one must be careful, as you probably sensed when you were asking this question. (Working hastily and without careful thought, one might, for example, try to prove what you want by applying the result just mentioned with $G$ equal to the annulus, and one of the functions $g$ or $k$ equal to a branch of the logarithm--- conveniently forgetting for a moment that the result being appealed to concerns analytic functions on $G$, and there isn't an analytic logarithm on the annulus.)
To get an actual proof along these lines, one must proceed more carefully: let $A$ be the annulus, and let $k(z)$ denote e.g. the principal branch of the logarithm. Then $k$ is analytic on the connected open set $G = A \setminus (-\infty,0]$. If $g$ is an analytic function on $A$ satisfying $\operatorname{Re} g(z) = \log |z|$ for all $z \in A$, the result of the previous paragraph implies that there is a real constant $C$ with the property that $g(z) = k(z) + iC$ holds for all $z \in G$ (not all $z \in A$). Hence $k(z) = g(z) - iC$ holds for all $z \in G$, and as $g$ is continuous on all of $A$, we deduce from this equation that for any $c$ in the nonempty set $A \cap (-\infty,0)$, the limit $\lim_{z \to c, z \in G} k(z)$ exists (and is $g(c) - iC$). This contradicts the fact, obvious from the explicit formulas for $k$, that $k$ has a jump discontinuity at every point on the negative real axis.
Best Answer
"you generally solve such a problem with the Cauchy-Riemann equations" -@Potato
If $f=u+iv$ is an analytic function then it satisfies $u_x=v_y$ and $u_y=-v_x$
$$u_x=v_y$$ $$\implies u_x=\frac{2y}{x^2+y^2}$$ $$\implies u=2\tan^{-1}\left(\frac{x}{y}\right)+g(y)$$ $$\implies u_y=-\frac{2x}{x^2+y^2}+g'(y)$$ $$\implies -v_y=-\frac{2x}{x^2+y^2}+g'(y)$$ $$\implies -\frac{2x}{x^2+y^2}=-\frac{2x}{x^2+y^2}+g'(y)$$ $$\implies g'(y)=0\implies g(y)=c$$
Thus, $u=2\tan^{-1}\left(\frac{x}{y}\right)+c$
and hence function $f=\left(2\tan^{-1}\left(\frac{x}{y}\right)+c\right)+i(\ln(x^2+y^2))$