The easiest way is probably to use the formalism of complex differential forms. If $dz = dx + i\,dy$ and $d\bar z = dx - i\,dy$, then $d\bar z \wedge dz = (dx - i\,dy) \wedge (dx + i\,dy) = 2i\,dx \wedge dy.$
For the first integral, put $\omega = f \,d\bar z$. Choose a smoothly bounded domain $\Omega$ containing $K$. By Stokes' theorem, $ \int_{\partial \Omega} \omega = \int_{\Omega} d\omega = \int_\Omega \partial \omega + \bar\partial\omega = \int_{\Omega} \frac{\partial f}{\partial z}\,dz\wedge d\bar z = -2i \int_\Omega \frac{\partial f}{\partial z}\,dx\wedge dy .$
But, the integral on the lefthand side is clearly $0$, since $\omega = 0$ outside of $K$ (in particular, $\omega = 0$ on $\partial\Omega$). For the second integral, do the same with $\omega = f\,dz$.