Regularization and $\int_{0}^{\infty}\sin x \;\mathrm{d}x$

Regularization is a way to make a divergent integral into a parametric family of finite integrals. Say, we need to evaluate $\int f(x) \mathrm{d} x$. We introduce (and this is a craft in itself) $f_\alpha(x)$, such that $\lim_{\alpha \to 0} f_\alpha(x) = f(x)$, such that $\int f_\alpha(x) \mathrm{d} x$ exists. We then perform, unjustified, interchanging of integration and taking the limit: $$ \int f(x) \mathrm{d} x = \int \lim_{\alpha \to 0} f_\alpha(x) \mathrm{d} x \stackrel{?}{=} \lim_{\alpha \to 0} \int f_\alpha(x) \mathrm{d} x $$

In your particular case, integral can be defined using Abel summations, since $$ \int_0^\infty \sin(x) \mathrm{d} x = \sum_{n=0}^\infty \int_{\pi n}^{\pi (n+1)} \sin(x) \mathrm{d} x = \sum_{n=0}^\infty 2 (-1)^n \stackrel{\text{Abel}}{=} 1 $$ Different regularization of divergent series do not need to give the same result, however, under certain conditions they do.

Coming back to your integral, its regularization is done, just like you did, by taking advantage of the hypergeometric nature of the integrand, and representing the integral as limit of Mellin convolutions (i.e. $\int_0^\infty h_\alpha(x) \sin(x) \mathrm{d} x$, where $h_\alpha(x)$ is another hypergeometric function, that makes the integral convergent, and such that $\lim_{\alpha \downarrow 0} h_\alpha(x) = 1$): $$ \lim_{\alpha \downarrow 0} \int_0^\infty \frac{\sin(x)}{x^\alpha}\mathrm{d} x = \lim_{\alpha \downarrow 0} \left( \Gamma(1-\alpha) \cos\left( \frac{\pi \alpha}{2} \right) \right) = 1 $$ $$ \lim_{\alpha \downarrow 0} \int_0^\infty \mathrm{e}^{-\alpha x} \sin(x) \mathrm{d} x = \lim_{\alpha \downarrow 0} \frac{1}{\alpha^2 + 1} = 1 $$ $$ \lim_{\alpha \downarrow 0} \int_0^\infty \frac{\sin(x)}{1+\alpha x} \mathrm{d} x = \lim_{\alpha \downarrow 0} \left( \frac{2 \sin \left(\frac{1}{\alpha }\right) \text{Ci}\left(\frac{1}{\alpha }\right)+\cos \left(\frac{1}{\alpha }\right) \left(\pi -2 \text{Si}\left(\frac{1}{\alpha }\right)\right)}{2 \alpha } \right) = 1 $$


\begin{eqnarray*} \int_{0}^{\infty}\sin\left(x\right)\,{\rm d}x & = & \Im\int_{-\infty}^{\infty}\Theta\left(x\right){\rm e}^{{\rm i}x}\,{\rm d}x = \Im\int_{-\infty}^{\infty} \left({\rm i}\int_{-\infty}^{\infty}{{\rm d}k \over 2\pi}\,{{\rm e}^{-{\rm i}kx} \over k + {\rm i}0^{+}}\right)\,{\rm e}^{{\rm i}x}\,{\rm d}x \\[3mm] & = & \Re\int_{-\infty}^{\infty}{{\rm d}k \over k + {\rm i}0^{+}} \int_{-\infty}^{\infty}{{\rm d}x \over 2\pi}\,{\rm e}^{-{\rm i}\left(k - 1\right)x} = \Re\int_{-\infty}^{\infty}{{\rm d}k \over k + {\rm i}0^{+}}\,\delta\left(k - 1\right) \\[3mm] & = & \Re\left(1 \over 1 + {\rm i}0^{+}\right) = \Re\left(1\right) - {\rm i}\,\pi\,\delta\left(1\right) = 1 \end{eqnarray*}

Why does it work ?: See $\tt @Sasha$ answer.