In fact, behind your question, there is a very interesting mathematical "character" which is
$$PV \left( \frac{1}{x} \right).$$
We could avoid it, remaining with classical analysis tools as in this question whose interest is to introduce the concept of (Cauchy) Principal Value (abbreviated as "PV").
The rigorous way to attack this issue is to define it as a "distribution" in the framework of... "distribution theory", through its action on a generic "test function" $\varphi$ :
$$PV \left( \frac{1}{x} \right)(\varphi) := \lim_{\varepsilon\to 0} \int_{|x|>\varepsilon} \left( \frac{1}{x} \varphi(x) \right) dx
$$
Please note
There are different ways to handle "$PV \left( \frac{1}{x} \right)$" :
- as the limit when $\varepsilon \to 0$ of odd functions defined by :
$$f_{\varepsilon}(x):=\frac{x}{\varepsilon^2+x^2},$$
an astute way to overcome singularity $x=0$ !
In particular $\int_{[-a,a]}f_{\varepsilon}(x)dx=0$, whatever $a>0$...
(Fourier transform of the distribution PV $\left( \frac{1}{x} \right)$)...
Remark : Distribution PV $\left( \frac{1}{x}\right)$ behaves, apart from properties due to singularity $0$, as ordinary function $1/x$. Thus we can await a differentiation formula generalizing $(1/x)'=-1/x^2$. Here it is :
$$\left(PV \left( \frac{1}{x} \right)\right)' = -FP \left( \frac{1}{x^2} \right)$$
(Derivative of principal value distribution $1/x$ is equal to finite part distribution $-1/x^2$?) where FP is for "Finite Part", which is another distribution. The concept of "finite part", introduced by Hadamard in classical analysis around 1900, is different from the "Principal Value" concept. See for that (https://www.ntu.edu.sg/home/mwtang/hypersie.pdf).
Nevertheless, one must be very cautious for some operations such as this one :
$$\begin{cases}(\delta \times x) \times PV(\frac1x)&=&0& \text{whereas}\\\delta \times (x \times PV(\frac1x))&=&\delta&\end{cases}$$
due to the fact that the product of distributions isn't associative as recalled here.