Is the mentioned method appropriate to solve $\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx$? The integral is, 
$$I=\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx$$
I know the answer would be $\pi$ and I know how to solve this using Feynman's method and Fourier transform. However I was trying something, rather naively, since by understanding of the subject is constrained to undergraduate mathematical physics. I did the following, taking the imaginary part of $e^{ix}$, 
$$\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx=\Im\left\{\int_{-\infty}^{\infty}\frac{e^{ix}}{x}\, dx\right\}$$
Then I introduced a variable $\alpha$ where taking $\alpha=1$ would result in the required integral. So we have here,
$$I(\alpha)=\Im\left\{\int_{-\infty}^{\infty}\frac{e^{i\alpha x}}{x}\, dx\right\}$$
Taking the derivative of $I$ with $\alpha$ we will get, 
$$\frac{dI(\alpha)}{d\alpha}=\Im\left\{\int_{-\infty}^{\infty}ie^{i\alpha x}\, dx\right\}$$
We know that this is the definition of Dirac delta, $\delta(\alpha)$. Therefore,
$$\frac{dI(\alpha)}{d\alpha}=\Im\left\{i2\pi\delta(\alpha)\right\}=2\pi\delta(\alpha)$$
Integrating with $\alpha$, 
$$I(\alpha)=2\pi\theta(\alpha)+c$$
Where, $\theta$ is the Heaviside step function and $c$ is the constant of integration. Using $\alpha=-\infty$ from the initial equation we shall get $I(-\infty)=0$, which gives $c=0$. Therefore, 
$$I(\alpha)=2\pi\theta(\alpha)$$
And putting $\alpha=1$ here, we have, 
$$I=2\pi$$
Which isn't the required answer. I want to know where I am going wrong, which step, or if it's the entire method. I am also not aware of all the properties of the functions I used and this is just me fiddling with things, so I will be really obliged if anyone can help.
Edit for duplication claim: My question isn't exactly about how to solve the sinc integral using the known methods. I want to know what is wrong with the approach I am using, which I know is wrong, but I don't know what exactly is going wrong.
Edit after suggestion in comments: Okay assuming $\alpha=-\infty$ to calculate the integration constant's value, is kind of a blunder, since that's not gonna work. However, if I take $\alpha=-1$ this might work, and will give me, 
$$I(-1)=-\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx=-I(1)$$
This means, 
$$c=I(-1)=-I(1)$$
And that would give me, 
$$I(\alpha)=2\pi\theta(\alpha)-I(1)$$
And now taking $\alpha=1$,
$$I=\pi$$
And that matches the answer, however I am kinda skeptical if this approach is right. 
 A: So effectively your start-at-$-1$ approach boils down to $$I=\frac{I-(-I)}{2}=\frac{1}{2}\int_{-1}^1 d\alpha\frac{d}{d\alpha}\Im\int_{\Bbb R}\frac{e^{i\alpha x} dx}{x}=\int_{-1}^1 d\alpha \pi\delta (\alpha)=\pi,$$which is indeed correct. In fact, the use of $[-1,\,1]$ as our integration range can be enormously generalised. Note that susbtitution obtains $\int_{\Bbb R}\frac{\sin \alpha x}{x}dx=I\operatorname{sgn}\alpha$ for any $\alpha\in\Bbb{R}$, including $\alpha =0$ viz. $\operatorname{sgn}0=0$. Thus if we chose any values $a,\,b$ of distinct sign we'd have $$I=\frac{1}{\operatorname{sgn}b-\operatorname{sgn}a}\int_a^b d\alpha 2\pi\delta(\alpha),$$so $I=\pi$ follows provided it makes sense to say $$\int_a^b d\alpha 2\pi\delta(\alpha)=\pi(\operatorname{sgn}b-\operatorname{sgn}a).$$The only special case where you might question this is when $a$ or $b$ is $0$, whence we need $$b>0\implies\int_0^{b}\delta(\alpha) d\alpha=\tfrac{1}{2}.$$But this is indeed a sensible characterisation of $\delta (x)$ because $x\mapsto -x$ implies $$\int_0^{b}\delta(\alpha) d\alpha=\tfrac{1}{2}\int_{-b}^{b}\delta(\alpha) d\alpha=\tfrac{1}{2}.$$Given the need to define $\theta (x):=\int_{-\infty}^x\delta(\alpha) d\alpha$, we end up saying $\theta(0)=\tfrac{1}{2}$, making $\theta$ neither left- nor right-continuous at $0$. Other conventions are sometimes used, in which case greater case is needed in this problem.
