Derivative and partial derivative of complex functions

The relation you observe is exactly how we get to the Cauchy-Riemann equations for the real and imaginary parts of an analytic function.

The complex derivative of a function $f:U\to{\bf C}$ at $z_0\in U$ where $U$ is an open subset of ${\bf C}$ is defined by $$ f'(z_0)=\lim_{z\to z_0:z\in U\backslash\{z_0\}}\frac{f(z)-f(z_0)}{z-z_0}\tag{1} $$ If ${f}$ is complex differentiable at ${z_0}$, then by specialising the limit (1) to variables ${z}$ of the form ${z = z_0 + h}$ for some non-zero real ${h}$ near zero we have $$ \lim_{z\to z_0:z\in U\backslash\{z_0\}}\frac{f(z)-f(z_0)}{z-z_0} =\lim_{h\to 0:h\in{\bf R}\backslash\{0\}}\frac{f((x_0+h)+iy_0)-f(x_0+iy_0)}{h} =u_x(z_0)+v_x(z_0)=:\frac{\partial f}{\partial x}(z_0) $$ where $z_0=x_0+iy_0$ and $f=u+iv$.