Integrals like this are said to dependend on the contour of integration:
$$\int^{\infty}_{-\infty}\frac{x\sin x}{x^2-\sigma^2}dx=\pi e^{i\sigma}\space \mathrm{or}\quad \pi \cos\sigma $$
How is it possible that an improper integral has multiple values? Is this similar to the case where the improper integral doesn't exist and we have to use the Cauchy principal value (because the integral would depend on the limit)?
Does the problem remain if we don't use contours at all?
I've encountered this type of integrals in Quantum Field Theory and in Arkfen's Mathematical methods, so I don't if this is one of the cases were physicists are being sloppy. Since my complex calculus followed Churchill, I never saw how to deal with this problem.
To give some more context, in QFT, we have the propagator (related to Green's functions):
$$D(r)=\int dp^0 d^3p \frac{e^{-ip_0r^0+i\vec{p}\vec{r}}}{p_0^2-p^2-m^2}$$
I would call this a definite integral, rather than an improper integral, and it seems it will take different values depending on your parameter $\sigma$, since for a fixed $\sigma$ there is one integral and it either is integrable or it isn't.
For instance, for $\sigma =\pi/2$, you have that $\pi e^{i\sigma}=\pi e^{i\pi/2}=\pi\sin(\pi/2)=\pi$. So in this case the results you have coincide, (and they will also coincide for $\sigma =\pi/2+k\pi$ for $k\in\Bbb Z$).
I do not know this integral well, perhaps it is the case that if $\sigma\ne \pi/2+k\pi$, you can achieve different values, it which case the integral diverges.
But a well defined integral will only have one value.