What you have written is called Perron's formula and is a very important first step in analytical number theory: $ \frac1{2\pi i} \int_{c - i\infty}^{c+i\infty} \frac{y^s}{s} \, ds = \begin{cases} 1 & y > 1 \\ \frac12 & y = 1 \\ 0 & y < 1 \end{cases} $ for $y > 0$ and $c > 0$ (not just $c>1)$.
Let us first analyze what the integral means. First, what do the bounds mean? This is a contour integral, and we evaluate it on the line $c + it$. Does this integral make sense as such? The integral does not converge absolutely, and hence we have to be careful. The integral should be interpreted as $\int_{c-i\infty}^{c+i\infty} = \lim_{T \to \infty} \int_{c-iT}^{c+iT}$
Let's first do a simple case, when $y = 1$. In this case, we can compute the integral: $ \frac1{2\pi i} \int_{c - iT}^{c + iT} \frac1s \, ds = \frac1{2\pi} \int_{-T}^T \frac{dt}{c + it} = \frac1{2\pi} \int_0^T \left({\frac{1}{c + it} + \frac1{c - it}} \right)\, dt = \frac1{2\pi} \int_0^T \frac{2c}{c^2 + t^2} \, dt, $ which is some arctangent that we can easily compute.
Note that this doesn't depend on $c$. Why should we expect this to happen? If we integrated along some other line, we can shift from one contour to the other. When we do this, we don't cross any singularities because we assume that $c > 0$, so therefore the integral should be the same along any contour.
Before proving it, below is what we will expect.
For $y < 1$, we have that $y^c \to 0$ as $c \to +\infty$. Then we move the line of integration to the right, so the integrand becomes small, so the integral is $0$. For $y > 1$, we have $y^c \to 0$ as $c \to -\infty$, so we move the line of integration to the left. But the difference here is that we cross a singularity at $0$, and the residue of the singularity is $y^0 = 1$.
Proof:
We will work with the integral $\frac1{2\pi i} \int_{c - iT}^{c + iT} y^s \frac{ds}{s}$
First, consider the case $y < 1$; we want to move the contour to the right. We can write $\int_{c-iT}^{c+iT} = \int_{c - iT}^{d-iT} + \int_{d-iT}^{d+iT} - \int_{c+iT}^{d+iT}$ We just have to estimate the integrals on these three other sides. First, look at the horizontal integral (and write $s = \sigma - iT$) $\left \vert{\int_{c-iT}^{d-iT} \frac{y^s}s \, ds} \right \vert \leq \int_c^d \frac{y^\sigma}{T} \, d\sigma \leq \frac1T \int_c^\infty y^\sigma \, d\sigma = \frac{y^c}{|\log y| T}$ The same bound holds for $\int_{c+iT}^{d+iT}$. The last thing to think about is $\left \vert{\frac1{2 \pi i} \int_{d-iT}^{d+iT} \frac{y^s}{s} \, ds } \right \vert \leq C y^d \int_{-T}^T \frac{dt}{1 + |t|} \leq C y^d \log T$ Now, let $d \to \infty$. This term goes to zero, and we already had good estimates for the horizontal terms. So we have that if $0 < y < 1$ and $c > 0$ then $\left \vert{ \frac1{2 \pi i} \int_{c-iT}^{c+iT} \frac{y^s}{s} \, ds} \right \vert \leq \frac{y^c}{\pi T |\log y|}$ Taking the limit as $T \to \infty$ yields that $\lim_{T \to \infty} \frac1{2\pi i} \int_{c-iT}^{c+iT} \frac{y^s}s \, ds = 0$ So not only have we proved this, we've even proved this in a more quantitative way.
Let's think a bit more about this $\log y$ term. It is natural to expect to get a term like this, because we know that there is a discontinuity at $y = 1$, and we'll run into problems there.
Now, we evaluate the integral for $y > 1$; we want to move the contour to the left. So we can write $\frac1{2\pi i} \int_{c-iT}^{c+iT} = \frac1{2\pi i} \left({\int_{c-iT}^{-d - iT} + \int_{-d-iT}^{-d+iT} + \int_{-d+iT}^{c+iT}} \right) + 1 $ where the "$+1$" comes since we have a pole at $s = 0$ and by shifting the contour we pick up that pole. Now, we have the same type of argument as before, estimating each integral separately. We have $\left \vert{\int_{-d-iT}^{-d+iT} \frac{y^s}s \, ds} \right \vert \leq C y^{-d} \int_{-T}^T \frac{dt}{1 + |t|} \leq C y^{-d}\log T \to 0$ as $d \to \infty$.
For the horizontal integrals, we have precisely the same bounds as before: they are bounded by $ \int_{-d}^c \frac{y^\sigma}{T} \, d\sigma \leq \frac{y^c}{T |\log y|}.$
So therefore when $y > 1$ and $c > 0$, we have $\left \vert{\frac1{2\pi i} \int_{c-iT}^{c+iT} \frac{y^s}s \, ds - 1} \right \vert \leq \frac{y^c}{\pi T |\log y|}$ so therefore $\lim_{T \to \infty} \frac1{2\pi i} \int_{c-iT}^{c+iT} \frac{y^s}{s} \, ds = 1.$
Hence, we have
$ \frac1{2\pi i} \int_{c - i\infty}^{c+i\infty} \frac{y^s}{s} \, ds = \begin{cases} 1 & y > 1 \\ \frac12 & y = 1 \\ 0 & y < 1 \end{cases} $ for $y > 0$ and $c > 0$.