[proofplan]
We first record a polynomial growth bound for the Fourier coefficients of the cusp form, obtained by estimating the Fourier coefficients along the horizontal line $\operatorname{Im} z=1/n$. This gives absolute convergence of the Dirichlet series in the half-plane $\operatorname{Re}(s)>k+1$. In that same half-plane, the absolute convergence allows us to interchange the [Fourier series](/page/Fourier%20Series) with the Mellin integral. The remaining one-dimensional integrals are evaluated by the substitution $t=2\pi n y$, giving the factor $(2\pi)^{-s}\Gamma(s)$.
[/proofplan]
[step:Derive a polynomial bound for the Fourier coefficients]
Let $\mathbb{H}=\{z\in\mathbb{C}:\operatorname{Im} z>0\}$, and for $y>0$ define the horizontal segment
\begin{align*}
\gamma_y:[0,1] &\to \mathbb{H} \\
x &\mapsto x+iy.
\end{align*}
Since $f$ is a cusp form of weight $k$ for $SL_2(\mathbb{Z})$, it is periodic under $z\mapsto z+1$ and has Fourier expansion
\begin{align*}
f(x+iy)=\sum_{m=1}^{\infty} a_m e^{2\pi i m x}e^{-2\pi m y}
\end{align*}
for every $x\in[0,1]$ and $y>0$. Hence Fourier inversion on the unit interval gives, for every $n\in\mathbb{N}$ and every $y>0$,
\begin{align*}
a_n e^{-2\pi n y}
=
\int_0^1 f(x+iy)e^{-2\pi i n x}\,d\mathcal{L}^1(x).
\end{align*}
We claim that there is a constant $C_f>0$ such that
\begin{align*}
|f(x+iy)|\leq C_f y^{-k}
\end{align*}
for all $x\in[0,1]$ and all $0<y\leq 1$. This is the standard cusp-form growth estimate at the cusp: applying the modular relation under $S:z\mapsto -1/z$ moves points with small imaginary part to points with large imaginary part, where cuspidality gives exponential decay. Thus, for $n\in\mathbb{N}$, taking $y=1/n$ gives
\begin{align*}
|a_n|
&\leq e^{2\pi n/n}\int_0^1 |f(x+i/n)|\,d\mathcal{L}^1(x) \\
&\leq e^{2\pi} C_f n^k.
\end{align*}
Define $A_f=e^{2\pi}C_f$. Then
\begin{align*}
|a_n|\leq A_f n^k
\end{align*}
for every $n\in\mathbb{N}$.
[guided]
We need an absolute convergence region in which the later interchange of sum and integral is justified. The Fourier expansion alone gives the exponential factor $e^{-2\pi n y}$, but the coefficients $a_n$ also have to be controlled. For cusp forms, a polynomial bound is enough.
For each $y>0$, define the path
\begin{align*}
\gamma_y:[0,1] &\to \mathbb{H} \\
x &\mapsto x+iy.
\end{align*}
Because $f$ is invariant under $z\mapsto z+1$, the function $x\mapsto f(x+iy)$ is $1$-periodic. Its Fourier expansion is
\begin{align*}
f(x+iy)=\sum_{m=1}^{\infty} a_m e^{2\pi i m x}e^{-2\pi m y}.
\end{align*}
Multiplying by $e^{-2\pi i n x}$ and integrating over $[0,1]$ with respect to one-dimensional Lebesgue measure isolates the $n$th Fourier coefficient:
\begin{align*}
\int_0^1 f(x+iy)e^{-2\pi i n x}\,d\mathcal{L}^1(x)
&=
\sum_{m=1}^{\infty} a_m e^{-2\pi m y}
\int_0^1 e^{2\pi i(m-n)x}\,d\mathcal{L}^1(x) \\
&=a_n e^{-2\pi n y}.
\end{align*}
Now use the cusp-form growth estimate near the cusp. Since $f$ has weight $k$ and vanishes at the cusp, there is a constant $C_f>0$ such that
\begin{align*}
|f(x+iy)|\leq C_f y^{-k}
\end{align*}
for all $x\in[0,1]$ and all $0<y\leq 1$. Substituting $y=1/n$ into the coefficient formula gives
\begin{align*}
|a_n|e^{-2\pi}
&\leq
\int_0^1 |f(x+i/n)|\,d\mathcal{L}^1(x) \\
&\leq
\int_0^1 C_f n^k\,d\mathcal{L}^1(x) \\
&=C_f n^k.
\end{align*}
Therefore, with $A_f=e^{2\pi}C_f$,
\begin{align*}
|a_n|\leq A_f n^k
\end{align*}
for every $n\in\mathbb{N}$.
[/guided]
[/step]
[step:Justify the interchange of the Fourier series and the Mellin integral]
Let $s\in\mathbb{C}$ and set $\sigma=\operatorname{Re}(s)$. Assume $\sigma>k+1$. For each $n\in\mathbb{N}$, define
\begin{align*}
g_n:(0,\infty)&\to\mathbb{C} \\
y&\mapsto a_n e^{-2\pi n y}y^{s-1}.
\end{align*}
Then
\begin{align*}
\sum_{n=1}^{\infty}\int_0^\infty |g_n(y)|\,d\mathcal{L}^1(y)
&=
\sum_{n=1}^{\infty}|a_n|\int_0^\infty e^{-2\pi n y}y^{\sigma-1}\,d\mathcal{L}^1(y) \\
&=
\Gamma(\sigma)(2\pi)^{-\sigma}\sum_{n=1}^{\infty}|a_n|n^{-\sigma}.
\end{align*}
Using $|a_n|\leq A_f n^k$, the final series is bounded by
\begin{align*}
A_f\sum_{n=1}^{\infty}n^{k-\sigma},
\end{align*}
which converges because $\sigma>k+1$. Hence the series $\sum_{n=1}^{\infty}g_n$ is absolutely integrable on $(0,\infty)$, and Tonelli's theorem followed by absolute convergence permits termwise integration:
\begin{align*}
\int_0^\infty f(iy)y^{s-1}\,d\mathcal{L}^1(y)
=
\sum_{n=1}^{\infty}
a_n
\int_0^\infty e^{-2\pi n y}y^{s-1}\,d\mathcal{L}^1(y).
\end{align*}
[guided]
We now explain why it is legitimate to insert the Fourier expansion into the integral. Let $s\in\mathbb{C}$ and write $\sigma=\operatorname{Re}(s)$. We assume $\sigma>k+1$. For each $n\in\mathbb{N}$, define the measurable function
\begin{align*}
g_n:(0,\infty)&\to\mathbb{C} \\
y&\mapsto a_n e^{-2\pi n y}y^{s-1}.
\end{align*}
The absolute value is
\begin{align*}
|g_n(y)|=|a_n|e^{-2\pi n y}y^{\sigma-1},
\end{align*}
because $y>0$ and therefore $|y^{s-1}|=y^{\operatorname{Re}(s)-1}=y^{\sigma-1}$.
We estimate the sum of the $L^1$ norms:
\begin{align*}
\sum_{n=1}^{\infty}\int_0^\infty |g_n(y)|\,d\mathcal{L}^1(y)
&=
\sum_{n=1}^{\infty}|a_n|\int_0^\infty e^{-2\pi n y}y^{\sigma-1}\,d\mathcal{L}^1(y) \\
&=
\Gamma(\sigma)(2\pi)^{-\sigma}\sum_{n=1}^{\infty}|a_n|n^{-\sigma}.
\end{align*}
The integral evaluation used here is the usual Gamma-integral substitution with real parameter $\sigma>0$. The coefficient bound from the previous step gives
\begin{align*}
\sum_{n=1}^{\infty}|a_n|n^{-\sigma}
\leq
A_f\sum_{n=1}^{\infty}n^{k-\sigma}.
\end{align*}
The $p$-series on the right converges exactly because $k-\sigma<-1$, equivalently $\sigma>k+1$.
Thus
\begin{align*}
\sum_{n=1}^{\infty}\int_0^\infty |g_n(y)|\,d\mathcal{L}^1(y)<\infty.
\end{align*}
This absolute integrability is the hypothesis needed to interchange the infinite sum and the integral. Therefore,
\begin{align*}
\int_0^\infty f(iy)y^{s-1}\,d\mathcal{L}^1(y)
&=
\int_0^\infty
\sum_{n=1}^{\infty}a_n e^{-2\pi n y}y^{s-1}\,d\mathcal{L}^1(y) \\
&=
\sum_{n=1}^{\infty}
a_n
\int_0^\infty e^{-2\pi n y}y^{s-1}\,d\mathcal{L}^1(y).
\end{align*}
[/guided]
[/step]
[step:Evaluate the elementary Mellin integrals]
Fix $n\in\mathbb{N}$. Since $\operatorname{Re}(s)>k+1\geq 2$, in particular $\operatorname{Re}(s)>0$, so the Gamma integral converges. Define the change of variables
\begin{align*}
T_n:(0,\infty)&\to(0,\infty) \\
y&\mapsto 2\pi n y.
\end{align*}
Under $t=T_n(y)$, one has $d\mathcal{L}^1(y)=(2\pi n)^{-1}d\mathcal{L}^1(t)$ and $y=t/(2\pi n)$. Hence
\begin{align*}
\int_0^\infty e^{-2\pi n y}y^{s-1}\,d\mathcal{L}^1(y)
&=
\int_0^\infty e^{-t}\left(\frac{t}{2\pi n}\right)^{s-1}(2\pi n)^{-1}\,d\mathcal{L}^1(t) \\
&=
(2\pi n)^{-s}\int_0^\infty e^{-t}t^{s-1}\,d\mathcal{L}^1(t) \\
&=
(2\pi n)^{-s}\Gamma(s).
\end{align*}
[/step]
[step:Sum the evaluated integrals to obtain the completed $L$-function]
Substituting the integral evaluation into the termwise integral identity gives
\begin{align*}
\int_0^\infty f(iy)y^{s-1}\,d\mathcal{L}^1(y)
&=
\sum_{n=1}^{\infty}a_n(2\pi n)^{-s}\Gamma(s) \\
&=
(2\pi)^{-s}\Gamma(s)\sum_{n=1}^{\infty}a_n n^{-s} \\
&=
(2\pi)^{-s}\Gamma(s)L(f,s) \\
&=
\Lambda(f,s).
\end{align*}
The absolute convergence proved above ensures that every series appearing in this computation converges in the half-plane $\operatorname{Re}(s)>k+1$. This proves the stated Mellin transform formula.
[/step]