The book tells me to use the following integral,
$$ \frac{1}{2\pi i}\int_{c-i \infty}^{c+i\infty}y^s\frac{ds}{s}= \begin{cases} 0\quad&\text{if }0<y<1,\\ \frac{1}{2}&\text{if }y=1,\\ 1&\text{if }y>1, \end{cases} $$
where $c>0$. I don't need to prove this but I wanted to make sense of this integral. Here's my (pseudo)proof for the first case.
Consider a rectangular path consisting of $c+iT$, $c-iT$, $c+S-IT$ and $c+S+IT$ for some $T,S>0$. Call each path, starting from $c+iT$, $C_1,C_2,C_3$ and $C_4$ respectively - so $C_1$ and $C_3$ are two vertical paths and the other two are horizontal paths. If we integrate $\frac{y^s}{s}$ over this rectangle, the result is 0 since there is no pole or zero inside. As $S,T\to\infty$, integrals along $C_2,C_3,C_4$ vanish since $\left|\frac{y^s}{s}\right|\to0$. Therefore, integral along $C_1$ is also 0 as $S,T\to\infty$.
Now, I know I can use pretty much the same proof for $y>1$ case just by taking a rectangle extending to the left this time. However, I'm having a little bit if of difficulty to prove the case $y=1$ Can anyone help me? (Also, it'd be great if someone can tell me my proof is right)
When $y=1$ you just have $\frac{1}{2\pi i} \left. \ln(s) \right |_{c-i\infty}^{c+i\infty}$. In the sense of Cauchy principal value at least, this evaluation is just $\pi i$ giving an overall result of $1/2$. Without some such regularization you could have a real part persisting, which is not a surprise because the integral is not absolutely convergent.