Here's a way to transform this nonlinear PDE to a linear PDE:
First note that the PDE can be written as $|\nabla u|^2 = f.$ This implies $|\nabla u| = \sqrt{f}$ and there exists some unit vector field $\vec{n}(x,y)$ such that $\nabla u = \sqrt{f}\,\vec{n}.$
Now, the rotation of a gradient vanishes, so
$$
\vec{0} = \nabla\times\nabla u = \nabla\times(\sqrt{f}\,\vec{n})
= (\nabla\sqrt{f})\times\vec{n} + \sqrt{f}\,(\nabla\times\vec{n}),
$$
or, when $f\neq 0,$
$$
\nabla\times\vec{n} = -\frac{\nabla\sqrt{f}}{\sqrt{f}}\times\vec{n}.
$$
Setting $\vec{\varphi} = -\frac{\nabla\sqrt{f}}{\sqrt{f}}$ we arrive at
$$
\nabla\times\vec{n} = \vec{\varphi}\times\vec{n}.
$$
If we can solve this for $\vec{n}$ then we have $\nabla u = \sqrt{f}\,\vec{n}$ and can just set $u(x,y) = \int_\gamma \sqrt{f}\,\vec{n} \cdot d\vec{r}$ for some path $\gamma$ from $(0,0)$ to $(x,y).$