What is the distribution of the following limit? Assume $x \in \mathbb{R}$. We already know that
$$\lim_{\epsilon \to 0+} \frac{1}{x-i\epsilon} - \frac{1}{x+i\epsilon} = 2\pi i \delta_x.$$
Here $\delta_x$ denotes the Dirac distribution. If we consider a slightly more irregular limit
$$\lim_{\epsilon \to 0+}\frac{\log^m(x-i\epsilon)}{x-i\epsilon} - \frac{\log^m(x+i\epsilon)}{x+i\epsilon},$$
what will be the result distribution? Here $m \ge 1$ is an integer.
 A: This question already has an impeccable answer but I would like to give a second one in the hope that it might be of interest to the OP.  Before so doing, I will list the properties of distributions (on the line) that I require:

*

*Any “reasonable” function can be regarded as a distribution (in our context, this means locally integrable);


*Any “reasonable” notion of convergence for functions is stronger than distributional convergence (in our context, local $L^1$-convergence);


*Any distribution is differentiable and we can always interchange the operations of taking limits and distributional convergence in a sequence of distributions.
I will start with the (familiar) case $m=0$ of the required equation since this displays the essence of the problem.  We choose the branch of the logarithm function (on the plane minus the negative real axis)  $\ln z= \ln |z| + i \arg z$ with the argument function ranging from $]-\pi,\pi[$.
Thus for positive $\epsilon$, $$\ln (x+ i \epsilon)= \ln |x+i\epsilon|+i\arg (x +i\epsilon).$$  If we substract this from the corresponding equation with $-\epsilon$, differentiate with respect to $x$ and take the limit we get the required expression on the LHS.  On the right hand side, we first take the limit, which is $-2\pi i H (-x)$ (with $H$ the Heaviside function), and THEN differentiate. This gives the required equation.
The more general case can be proved similarly—starting from the equation
$$\ln^m(x+i\epsilon)=(\ln(|x+i\epsilon|)+i \arg(x+i\epsilon)^m,$$ subtracting this from the version for
$-\epsilon$, differentiating and taking the limit on the LHS, resp., taking the limit and then differentiating on the RHS.
Added as an edit: I should mention that I learned this proof during a lecture course on the elementary theory of distributions given by J. Sebastião e Silva in Lisbon over 50 years ago.
A: $\newcommand{\ep}{\epsilon}\newcommand{\de}{\delta}\newcommand{\R}{\mathbb{R}}$Let
\begin{equation*}
    K_\ep(x):=\frac{\ln^m(x-i\ep)}{x-i\ep}-\frac{\ln^m(x+i\ep)}{x+i\ep}. 
\end{equation*}
Let us show that, in an appropriate weak sense,
\begin{equation*}
    \frac{K_\ep}{\ln^m\ep}\to2\pi i\de_0 \tag{1}
\end{equation*}
(as $\ep\to0$).
Take any bounded continuous function $g\colon\R\to\R$. Then
\begin{align*}
    &\int_\R dx\,K_\ep(x)g(x)=\int_\R du\,[L(u-i)-L(u+i)]g(\ep u),
\end{align*}
where
\begin{equation*}
    L(z):=\frac{(\ln\ep+\ln z)^m}z=\sum_{k=0}^m\binom mk \ln^k\ep\,\frac{\ln^{m-k}}z.
\end{equation*}
So,
\begin{align*}
    &\int_\R dx\,K_\ep(x)g(x)=\sum_{k=0}^m\binom mk \ln^k\ep\; I_{m-k}(\ep), \tag{2}
\end{align*}
where
\begin{equation*}
I_j(\ep):=\int_\R du\,\Big(\frac{\ln^j(u-i)}{u-i}-\frac{\ln^j(u+i)}{u+i}\Big)g(\ep u).  
\end{equation*}
For each $j=0,1,\dots,m$ and all real $u$ with $|u|\ge2$,
\begin{equation*}
    \ln^j(u\pm i)-\ln^j u=\int_0^1 i\,dt\,j\frac{\ln^{j-1}(u\pm ti)}{u\pm ti}\ll
    \frac{\ln^{j-1}|u|}{|u|},
\end{equation*}
where $a\ll b$ means $|a|=O(b)$; here and in what follows, the constant in $O(\cdot)$ may depend only on $g$ and $m$.
So,
\begin{align*}
&\int_{|u|\ge2} du\,\Big(\frac{\ln^j(u-i)}{u-i}-\frac{\ln^j(u+i)}{u+i}\Big)g(\ep u) \\ 
&=\int_{|u|\ge2} du\,\ln^j u\,\Big(\frac{1}{u-i}-\frac{1}{u+i}\Big)g(\ep u)+O(1) \\ 
&=\int_{|u|\ge2} du\,\frac{2i\ln^j u}{u^2+1}\,g(\ep u)+O(1) 
=O(1). \end{align*}
Also, clearly,
\begin{equation*}
    \int_{|u|<2} du\,\Big(\frac{\ln^j(u-i)}{u-i}-\frac{\ln^j(u+i)}{u+i}\Big)g(\ep u)=O(1).
\end{equation*}
So,
\begin{equation*}
    I_j(\ep)=O(1) \tag{3}
\end{equation*}
for each $j=0,1,\dots,m$.
Moreover,
\begin{equation*}
I_0(\ep)=2i\int_\R \frac{du}{u^2+1}g(\ep u),    
\end{equation*}
\begin{equation*}
\int_{|u|\le1/\sqrt\ep} \frac{du}{u^2+1}g(\ep u)
=\int_{|u|\le1/\sqrt\ep} \frac{du}{u^2+1}(g(0)+o(1))\to\pi g(0),    
\end{equation*}
\begin{equation*}
\int_{|u|>1/\sqrt\ep} \frac{du}{u^2+1}g(\ep u)
\ll\int_{|u|>1/\sqrt\ep} \frac{du}{u^2+1}\to0.  
\end{equation*}
So,
\begin{equation*}
I_0(\ep)\to 2i\pi g(0). \tag{4}
\end{equation*}
Collecting (2), (3), and (4), we get
\begin{align*}
    &\frac1{\ln^m\ep}\,\int_\R dx\,K_\ep(x)g(x)\to2i\pi g(0).
\end{align*}
Thus, (1) is proved.
