I interpret this question as asking "What is the minimum I need to understand why I can manipulate $dx$ and $dy$ algebraically?"
At the simplest level (without going into differential forms and such), we can think of $dz=dx+idy$ in terms of a parameterization of the curve $\partial D$. We start by breaking up the curve into $N$ small chunks bounded by the points $z_{i=0,\dots,N}$, with $z_0=z_N$, and approximate each part of the curve as $\Delta z_i=z_{i+1}-z_i$. Then, we can sum up the function along the segmented curve as
$$
\sum_{i=0}^{N-1}f(z_i)\Delta z_i.
$$
We can break apart $\Delta z_i$ into real and imaginary parts as $\Delta z_i=\Delta x_i +i \Delta y_i$. In the limit, these little differences $\Delta x_i$ and $\Delta y_i$ correspond to the $dx$ and $dy$ in the integral. To make that correspondence more rigorous, we parameterize the curve as
$$
z(t) = x(t) +i y(t),
$$
with $t\in[0,1]$ and identify $z(t_i)=z_i$. Then, the sum above becomes
$$
\sum_{i=0}^{N-1}f(z(t_i))\frac{\Delta z_i}{\Delta t}\Delta t,
$$
where $\Delta t = t_{i+1}-t_i$ and
$$
\Delta z_i= z(t_{i+1})-z(t_i)
=\left(x(t_{i+1})-x(t_i)\right) + i\left(y(t_{i+1})-y(t_i)\right)
=\left(\Delta x_i\right) + i\left(\Delta y_i\right).
$$
Taking the limit of more and more, smaller and smaller chunks, the sum becomes
$$
\int_0^1f(z(t))z'(t)dt
=\int_0^1f(z(t))(x'(t)+iy'(t))dt.
$$
After expanding $f$ into real and imaginary parts, this integral can be separated into two integrals with real integrand which are the real and imaginary parts of the complex integrand.
Finally, then, we can interpret (in a sense) that $dx=x'(t) dt$ and $dy = y'(t) dt$, and the algebraic manipulations therefore follow from normal rules of algebra (because really, we're manipulating the integrand at that point and not differentials).
Notes
- First of all, of course, we have to assume convergence issues have been dealt with.
- Second, all of this also requires definitions and proofs involving of derivatives and integration of complex functions that show that both differentiation and integration are linear with respect to complex numbers, by which I mean, for instance, that $z'(t) = x'(t) + i y'(t)$ if $z(t) = x(t) +i y(t)$, with $t$ real.