I want to prove with richness of details that if $f:\mathbb{R}^2\rightarrow\mathbb{R}$ with $f_x(x,y)=f_y(x,y)=0$ for all $(x,y)\in\mathbb{R}^2$
Here is my progress
Fixing $y_0$ and considering $$g(x) :=f(x, y_0), $$ a real valued fuction of $x$, if I also fix a $x_0\in\mathbb{R}$, then I only need to prove that $g(x) =f(x,y_0)=f(x_0,y_0)$
So for every $x\neq0$, I use the mean-value theorem to find a $\overline{x}$ on the interval $] x_0,x[$ such that $$f(x,y_0)-f(x_0,y_0)=f_x(\overline{x},y_0)(x-x_0) $$
But $(\overline{x},y_0)\in\mathbb{R}^2$ and since $f_x=0$ in all $\mathbb{R}^2$, I have $$f(x, y_0)-f(x_0,y_0)\ \ \Rightarrow \ \ f(x, y_0)=f(x_0,y_0)$$
In a similar way, I can first fix $x_0$, consider the function $h(y)=f(x_0,y)$. Fixing now $y_0$, the mean-value theorem allows me to find $\overline{y_0} \in ]y_0,y[$ such that $$f(x_0,y)-f(x_0,y_0)=f_y(x_0,\overline{y})(y-y_0) $$
Finally, using the hypothesis $f_y=0$, I concluded that $$f(x_0, y)-f(x_0,y_0)=0\ \ \Rightarrow \ \ f(x_0, y)=f(x_0,y_0)$$
Do you agree with me?