Integral representation for the heaviside step function I am studying many-particle quantum theory and I came across the following identity which is used to compute the Fourier transform of Green's functions, $$\theta(\pm \tau) = \mp \lim_{\eta \rightarrow 0^{+}} \frac{1}{2\pi i} \int_{-\infty}^{\infty} d\omega \frac{e^{- i \omega \tau}}{\omega \pm i \eta}.$$ I feel like I am missing something that should be totally obvious, but to me this expression should actually just have a minus sign in front, for both $\theta(\tau)$ and $\theta(-\tau)$. I think this is true because, $$\theta( \tau) = - \lim_{\eta \rightarrow 0^{+}} \frac{1}{2\pi i} \int_{-\infty}^{\infty}d\omega  \frac{e^{- i \omega \tau}}{\omega + i \eta}$$ such that, $$\theta(-\tau) =  - \lim_{\eta \rightarrow 0^{+}} \frac{1}{2\pi i} \int_{-\infty}^{\infty} d\omega \frac{e^{- i \omega (-\tau)}}{\omega + i \eta} = - \lim_{\eta \rightarrow 0^{+}} \frac{1}{2\pi i} \int_{-\infty}^{\infty} d(-\omega) \frac{e^{- i \omega \tau}}{-\omega + i \eta} $$
$$= - \lim_{\eta \rightarrow 0^{+}} \frac{1}{2\pi i} \int_{-\infty}^{\infty} d\omega \frac{e^{- i \omega \tau}}{\omega -i \eta}.$$ Can anyone point out to me what I am missing here? I keep messing up minus signs trying to follow derivations in my textbook and it keeps coming back to this exact problem.

When substituting $w\rightarrow -w$ the limits of integration also change. We have
$$\theta(\tau) = - \lim_{\eta \rightarrow 0^{+}} \frac{1}{2\pi i} \int_{-\infty}^{\infty} d\omega \frac{e^{- i \omega \tau}}{\omega + i \eta}.$$
and setting $\tau\rightarrow -\tau$ gives
$$\theta(- \tau) = - \lim_{\eta \rightarrow 0^{+}} \frac{1}{2\pi i} \int_{-\infty}^{\infty} d\omega \frac{e^{ i \omega \tau}}{\omega + i \eta}$$
$$=-\lim_{\eta\rightarrow 0^+}\frac{1}{2\pi i}\int_{\color{red}{\infty}}^{\color{red}{-\infty}}d(-w)\frac{e^{-iw\tau}}{-w+i\eta}$$
$$=-\lim_{\eta\rightarrow 0^+}\frac{1}{2\pi i}\int_{-\infty}^{\infty}dw\frac{e^{-iw\tau}}{-(w-i\eta)}$$
$$=\lim_{\eta\rightarrow 0^+}\frac{1}{2\pi i}\int_{-\infty}^{\infty}dw\frac{e^{-iw\tau}}{w-i\eta}$$
