Complex logarithm and the residue The integral expression for the complex logarithm is defined by:
$$\int_{\gamma} \frac{1}{z}\,dz$$
where $\gamma$ represents a rectifiable path  in $\mathbb{C}\setminus\{0\}$. The above integral defines $\text{log}(z)$, which has a branch cut emanating from $0$. And this is the source of my confusion when it comes to the calculation of the residue at $0$. I mean, are we supposed to insert a branch cut at zero and then consider a circular path around the branch ?
Edit
I will rephrase the above question. The logarithm is defined as:
$$\text{log}(z)=\text{log}|z| + i(\theta + 2\pi k)$$
Here, the integer $k$ defines the Riemann sheet, in other words how many times you transverse the branch cut emanating from $0$ in the positive sense. In order to cross the branch cut we must however trace around the zero. The question is then: does the factor $2\pi i k$ in fact represent the residue contribution ?
 A: The reason that it is interesting to calculate the residue of $\frac 1z$ at $0$ (or equivalently, the counterclockwise integral $\oint_{|z| = 1} \frac 1z dz$) is that it cannot be (directly) calculated using an antiderivative.
If $\gamma$ is a curve in $\Bbb C$ that starts at $a \in \Bbb C$ and ends at $b \in \Bbb C$ and if there exists a function $F(z)$ such that $F$ is differentiable at all points in $\gamma$ with $f(z) = \frac d{dz}F(z)$, then we have
$$
\int_\gamma f(z)\,dz = F(b) - F(a).
$$
It follows that if $\gamma$ is a closed contour (so that $a = b$), then we have $\int_\gamma f(z)\,dz = F(a) - F(a) = 0$.  In other words: if we know that there is an anti-derivative of $f$ that is globally defined along the contour $|z| = 1$, then it necessarily follows that its reside at $0$ is $0$.

That said, we can use the antiderivative to compute the residue if we split the desired integral into parts. Let $\gamma_1$ denote the path along $|z| = 1$ from $1$ to $-1$, and let $\gamma_2$ denote the path along $|z| = 1$ from $-1$ to $1$, both taken counterclockwise. We have
$$
\oint_{|z| = 1}\frac 1{z}\,dz = \int_{\gamma_1} \frac 1zdz + \int_{\gamma_2} \frac 1z dz.
$$
We now consider two different antiderivatives for $\frac 1z$ corresponding to different branch cuts. Define $\log^1,\log^2$ such that
$$
\log^1(e^{i \theta}) = i\theta, \quad \theta \in [-\pi/2,3 \pi/2);\\
\log^2(e^{i \theta}) = i\theta, \quad \theta \in [\pi/2, 5\pi/2).
$$
We then have
$$
\int_{\gamma_1} \frac 1zdz = \log^1(-1) - \log^1(0) = \pi i - 0 = \pi i,\\
\int_{\gamma_2} \frac 1z dz = \log^2(0) - \log^2(-1) = 2 \pi - \pi i = \pi i. 
$$

Regarding your edited question: your definition
$$
\log(re^{i\theta}) = \{\log r + i(\theta + 2 \pi k) : k \in \Bbb Z\}
$$
is consistent with the definition
$$
\log(z) = \left\{\int_{\gamma}\frac 1z \,dz : \gamma \text{ is a contour from } 1\ \text{to}\ z\right\}.
$$
It is indeed the case that the multiple of $k$ corresponds to the contribution of the residue at $z = 0$.
