When calculating the characteristic function of the exponential distribution function, we need to evaluate the complex-integration: \begin{align*} \int_0^\infty e^{itx}e^{-x} dx \end{align*} for any $t \in \mathbb{R}$.
I understand how to evaluate this integral by treating the real part and imaginary part separately, but I am wondering is there any approach that uses the complex analysis theory? I found some answer uses the seemingly unjustified "fundamental theorem of calculus":
$$\int_0^\infty e^{(it - 1)x} dx = \frac{1}{it - 1}\int_0^\infty e^{(it - 1)x} d(it - 1)x = \frac{1}{1 - it}.$$
I think this solution is lacking any theoretic support (maybe I am wrong, please advise if there is any theorem that supports the above calculation). Specifically, can this integral be evaluated using residue calculus (contour integration)?

You're right to demand justification beyond glib use of the FTC. But it is true that $$ \int_0^\infty e^{-ax}dx = \frac{1}{a}$$ whenever $\Re(a)>0.$
In complex analysis, we can still affect the change of variables to $z=ax,$ but the resulting integral is along a ray in the complex plane in the direction of $a,$ not the positive real axis (unless $a$ is a positive real). We can write this (using somewhat bad notation) as $$\int_0^\infty e^{-ax}dx = \frac{1}{a} \int_0^{a\infty}e^{-z}dz.$$
(To see formally that the change of variables works, note that we have the parametrization $\gamma(t) = at$ for $0<t<\infty$ for the ray. We can write the integral of $e^{-z}/a$ along that path as $$ \int_0^\infty \frac{e^{-\gamma(t)}}{a}\gamma'(t)dt = \int_0^\infty \frac{e^{-at}}{a}adt = \int_0^\infty e^{-at}dt$$).
Now, the difficult part is how we can justify saying $$ \int_0^{a\infty}e^{-z}dz = \int_0^\infty e^{-x}dx = 1.$$
In other words we want to be able to rotate the contour back down to the real axis without changing the value of the integral.
To see why we can do this, imagine doing a integral around a large wedge-shaped contour. It goes out along the real axis to $R \gg 1$ and then goes along a circular path to $Re^{i\arg(a)}$ and then back into the origin along the ray $[0,a\infty)$ that our integral is taken over.
By Cauchy's theorem, the integral along this closed path is zero since $e^{-z}$ is analytic. The integral along the circular path goes to zero as $R\to \infty.$ We can see this cause the integrand decays like $e^{-R}.$ More formally the integral is $$ \int_0^{\arg a} e^{-Re^{i\theta}}Re^{i\theta}id\theta $$ and we have $$ \left|\int_0^{\arg a} e^{-Re^{i\theta}}Re^{i\theta}id\theta\right| \le \arg(a) \max_\theta|ie^{-Re^{i\theta}}Re^{i\theta}| = \arg(a)Re^{-R\cos(\arg(a))} \to 0$$ as $R\to\infty$
Thus as $R\to \infty,$ the integral along the real axis must cancel out the integral along the ray $[0,a\infty)$ in order that the integral along the closed path be zero as Cauchy's theorem demands. We have $$\int_0^{a\infty}e^{-z}dz = \int_0^\infty e^{-x}dx = 1 $$ and therefore $$ \int_0^\infty e^{-ax}dx = \frac{1}{a} \int_0^{a\infty}e^{-z}dz = \frac{1}{a}.$$
I've intentionally not said explicitly where $\Re(a)>0$ is used in the above argument. Of course, it's essential. See if you can find where it's used.