I have been looking at the proof for $\frac{d}{dx}\ln|x|=\operatorname{p.v.}\left(\frac{1}{x}\right)$ in the context of distributions and I am having trouble understanding why in the second term after integration by parts the limits we are subbing for $x$ are $\epsilon$ and $-\epsilon$ (the bit is highlighted in blue). The reason for my confusion is that $[a,-a]\backslash[-\epsilon,\epsilon]$ means $[-a,-\epsilon]\cup[\epsilon,a]$ so I am not sure why we are not using this for limits in the integral instead.
Please note that $\operatorname{p.v.}\left(\frac{1}{x}\right)$ is Cauchy principal value of $\frac{1}{x}$ defined as: $$\left\langle \operatorname{p.v.}\left(\frac{1}{x}\right), \phi\right\rangle = \lim_{\epsilon\to0} \int_{|x|>\epsilon} \frac{1}{x}\phi(x)\,dx$$
Here is the proof I have been referring to:
For any $\phi\in\mathcal D(\mathbb R)$ (i.e. it is a test function) with $\operatorname{supp}\phi = [a,-a]$ we have:
\begin{align*} \left\langle\frac{d}{dx}\ln|x|, \phi\right\rangle &=-\langle \ln|x|, \phi'\rangle\\ &= - \lim_{\epsilon\to0} \int_{\mathbb R\backslash[-\epsilon,\epsilon]} \ln|x|\phi'(x) dx\\ &=- \lim_{\epsilon\to0}\left[\int_{[a,-a]\backslash[-\epsilon,\epsilon]} \frac{1}{x}\phi(x) dx + \color{blue}{(\ln|\epsilon|)(\phi(\epsilon)-\phi(-\epsilon))}\right]\\ &= - \lim_{\epsilon\to0} \int_{[a,-a]\backslash[-\epsilon,\epsilon]} \frac{1}{x}\phi(x) dx\\ &=\left\langle\operatorname{p.v.}\left(\frac{1}{x}\right), \phi\right\rangle \end{align*}
We can split the integral into two parts, one on $[\epsilon, \infty)$ and one on $(-\infty, -\epsilon]$.
We rewrite both parts using integration by parts: $$ \int_\epsilon^\infty \ln |x| \, \phi'(x) \, dx = \left[ \ln |x| \, \phi(x) \right]_\epsilon^\infty - \int_\epsilon^\infty \frac{1}{x} \, \phi(x) \, dx = -\ln \epsilon \, \phi(\epsilon) - \int_\epsilon^\infty \frac{1}{x} \, \phi(x) \, dx $$ and $$ \int_{-\infty}^{-\epsilon} \ln |x| \, \phi'(x) \, dx = \left[ \ln |x| \, \phi(x) \right]_{-\infty}^{-\epsilon} - \int_{-\infty}^{-\epsilon} \frac{1}{x} \, \phi(x) \, dx = \ln \epsilon \, \phi(-\epsilon) - \int_{-\infty}^{-\epsilon} \frac{1}{x} \, \phi(x) \, dx $$
Thus, $$ \int_{|x|>\epsilon} \ln |x| \, \phi'(x) \, dx = \left( \ln \epsilon \, \phi(-\epsilon) - \ln \epsilon \, \phi(\epsilon) \right) - \int_{|x|>\epsilon} \frac{1}{x} \, \phi(x) \, dx \\ = ( \ln \epsilon ) \left( \phi(-\epsilon) - \phi(\epsilon) \right) - \int_{|x|>\epsilon} \frac{1}{x} \, \phi(x) \, dx. $$