For $f$ be analytic on the disc $\overline{D}(0,R)$ centred at $0$ with radius $R>0$ and such that $f(0)\neq 0$, then the following formula is well-known
\begin{align} \frac{1}{2\pi}\int_{-\pi}^{\pi}e^{-i\theta}\log(|f(Re^{i\theta})|)d\theta=\frac{1}{2}R\frac{f'(0)}{f(0)}+\frac{1}{2}\sum_{\rho}\left(\frac{R}{\rho}-\frac{\overline{\rho}}{R} \right) \end{align}
where $\rho$ are the roots in $D(0,R)$
I have been stuck trying to calculate the following integral where the above formula cannot be applied (directly). Suppose $z_0 \in \mathbb{C}$ and $M=|z_0|+\epsilon$, where $\epsilon$ is as usual positive and small. What is then the value of the following integral
\begin{align} \frac{1}{2\pi}\int_{-\pi}^{\pi}e^{-i\theta}\log(|z_0+2M \Im(z_0 e^{-i \theta})-Me^{i\theta}|)d\theta \end{align}
I would be glad if anyone has suggestions, or can give some advice on reference