This solution doesn't follow your approach, but is still valid. We actually seek the evaluation of the following integral:
$$I=\int_0^\infty x^\mu e^{-ax}\sin(x)dx=\Im\int_0^\infty x^\mu e^{(i-a)x}dx$$
for $\mu>-1$ and $a>0$. The integral will be evaluated with a complex contour, the path of which will make sense in hindsight. We take as a contour a sector of an annulus with outer radius $R$ and inner radius $\epsilon$, and an angle of $\varphi=\arctan(1/a)$. This angle gives us the useful relationship of
$$(i-a)=\sqrt{a^2+1}e^{i(\pi-\varphi)}=-\sqrt{a^2+1}e^{-i\varphi}$$
which will come in handy later. The four pieces of the arc enclose no singularities, so by the Cauchy Integral Theorem, its integral is $0$. We were also careful to avoid the essential singularity at $0$, and must be wise to consider branch cuts. We then have
$$0=\oint z^\mu e^{(i-a)z}dz=\int_\epsilon^R x^\mu e^{(i-a)x}dx+\int_0^\varphi\left(Re^{i\theta}\right)^\mu e^{(i-a)Re^{i\varphi}}iRe^{i\theta}d\theta$$
$$+\int_R^\epsilon\left(xe^{i\varphi}\right)^\mu e^{(i-a)xe^{i\varphi}}e^{i\varphi}dx+\int_\varphi^0\left(\epsilon e^{i\theta}\right)^\mu e^{(i-a)\epsilon e^{i\theta}}i\epsilon e^{i\theta}d\theta$$
The second integral goes to $0$ as $R\to\infty$, and the fourth integral goes to $0$ as $\epsilon\to 0$ (can you show this?). This tells us that
$$\int_0^\infty x^\mu e^{(i-a)x}dx=e^{i(\mu+1)\varphi}\int_0^\infty x^\mu e^{-\sqrt{a^2+1}x}dx$$
We now take $a\to 0^+$ (noting that $\varphi\to\pi/2$) and get
$$\int_0^\infty x^\mu e^{ix}dx=e^{i(\mu+1)\frac{\pi}{2}}\int_0^\infty x^\mu e^{-x}dx=e^{i(\mu+1)\frac{\pi}{2}}\Gamma(\mu+1)$$
where $\Gamma$ is the Euler Gamma function. The imaginary portion of this is
$$\int_0^\infty x^\mu\sin(x)dx=\sin\left[(\mu+1)\frac{\pi}{2}\right]\Gamma(\mu+1)$$
This relates back to the integral in question of
$$J=\int_0^\infty\sin(x^2)dx$$
If we let $u=x^2$, then
$$J=\frac{1}{2}\int_0^\infty\frac{\sin(u)}{\sqrt{u}}du=\frac{1}{2}\sin\left(\frac{\pi}{4}\right)\Gamma\left(\frac{1}{2}\right)=\frac{\sqrt{2\pi}}{4}$$
For the cosine integral, we do the same process and instead take the real portion along the way.