How exactly does $\frac{\partial f}{\partial \bar{z}}$ work? I'm currently learning about complex analysis, and I keep coming across expressions involving $\frac{\partial f}{\partial \bar{z}}$. But I don't understand what this means. For example people might write
$$\frac{\partial }{\partial \bar{z}}z\bar{z}=z$$
But how does that make any sense? Why can we regard $z$ and $\bar{z}$ as independent variable while they clearly aren't?
In some material I've also read that  $\frac{\partial f}{\partial \bar{z}}=0$ can be interpreted as meaning that $f$ is 'independent' of $\bar{z}$. But $f$ depends on $z$, and $z$ can be thought of as 'depending' on $\bar{z}$, so clearly $f$ depends as much on $\bar{z}$ as it does on $z$. 
This  $\frac{\partial f}{\partial \bar{z}}=0$ condition, whatever it even means, seems to also be equivalent to $f$ being analytic, which then leads to people saying things like 'If $f$ can be expressed without involving $\bar{z}$ then it is analytic'. But this again seems very strange to me. For example
$$f(z)=\bar{z}=z-2\Im(z)$$
Can certainly 'be expressed' without explicitly involving $\bar{z}$, but is not analytic, so this also doesn't make any sense to me.
Basically I'm asking for clarification on why in complex analysis people seem to be doing these dodgy things, and what they mean by them.
 A: $\newcommand{\dd}{\partial}$The complex differential operators may be defined as complex linear combinations of ordinary partial derivatives:
$$
\frac{\dd}{\dd z} = \frac{1}{2}\left(\frac{\dd}{\dd x} - i\frac{\dd}{\dd y}\right),\qquad
\frac{\dd}{\dd \bar{z}} = \frac{1}{2}\left(\frac{\dd}{\dd x} + i\frac{\dd}{\dd y}\right).
\tag{1}
$$
This is what the chain rule would give if you treated $z = x + iy$ and $\bar{z} = x - iy$ as independent (so that $x = \frac{1}{2}(z + \bar{z})$ and $y = \frac{1}{2i}(z - \bar{z})$).
Then it's just a matter of formalities to check that
$$
\frac{\dd z}{\dd z} = \frac{\dd \bar{z}}{\dd \bar{z}} = 1,\qquad
\frac{\dd \bar{z}}{\dd z} = \frac{\dd z}{\dd \bar{z}} = 0
$$
and
$$
\frac{\dd}{\dd z} f(z, \bar{z}) = D_{1}f(z, \bar{z}),\qquad
\frac{\dd}{\dd \bar{z}} f(z, \bar{z}) = D_{2}f(z, \bar{z}),
$$
i.e., that a function expressed in terms of $z$ and $\bar{z}$ can be (formally) differentiated using the standard manipulations as if $z$ and $\bar{z}$ were independent variables.

If you must know, there's a rigorous construction (well-known to all students of complex geometry) that involves complexifying the tangent bundle of $\mathbf{R}^{2}$—equipped with the "complex structure" $J$ that rotates each tangent plane a quarter turn—and splitting the complexified tangent bundle into eigenbundles of (the natural extension of) $J$. The formulas (1) then define a complex-linear isomorphism between $(T\mathbf{R}^{2}, J)$ and the $i$-eigenbundle of $J$, and an anti-linear isomorphism with the $(-i)$-eigenbundle.
