You can view this as a limiting process. Start with the truncated integral:
$$
\frac{1}{2\pi}\int_{R}^{R}e^{j\omega t}dt = \frac{1}{\pi}\frac{\sin(R\omega)}{\omega}
$$
If you integrate this against a function and take the limit as $R\rightarrow\infty$, then
$$
\lim_{R\rightarrow\infty}\int_{-\infty}^{\infty}f(\omega)\frac{1}{2\pi}\int_{-R}^{R}e^{j\omega t}dt d\omega
= \lim_{R\rightarrow\infty}\frac{1}{2\pi}\int_{-R}^{R}\int_{-\infty}^{\infty}f(\omega)e^{j\omega t}d\omega dt.
$$
The above is $(f^{\wedge})^{\vee}(0)=f(0)$ if $f$ has some smoothness at $0$.
In the language of distributions, the Dirac delta distribution is the map $\delta$ from the space of test functions (smooth compactly supported functions) to, say $\mathbb{R}$ with the "operation" $(\delta, f) = f(0)$ for every test function $f$.
To figure out the Fourier transform of a distribution, you need to determine the Fourier transform of a test function $f$.
$$\widehat{f}(\xi) = \frac{1}{\sqrt{2\pi}}\int_\mathbb{R} e^{-ix \xi}f(x) \, dx$$
By definition, the Fourier transform of a distribution $\varphi$ is defined by $(\widehat{\varphi},f)=(\varphi,\widehat{f})$ for every test function $f$.
EDIT: As commenters below pointed out, I should say Schwartz function instead of test function and tempered distribution instead of distribution..
Therefore
$$(\widehat{\delta},f) = (\delta,\widehat{f}) = \widehat{f}(0) = \frac{1}{\sqrt{2\pi}}\int_\mathbb{R} e^{-i x \cdot 0} f(x) \, dx =\frac{1}{\sqrt{2\pi}}\int_\mathbb{R} f(x) \, dx = (\frac{1}{\sqrt{2\pi}},f)$$
where the last equality is because the "constant" distribution 1 is regular, i.e., can be represented in integral form. Therefore, as a distribution, $\widehat{\delta} = (2\pi)^{-1/2}$.
Best Answer
Let $$h_a(x)= \int_{-a}^a e^{i k x} dk = \frac{2 \sin(a x)}{x}= a \, H'(ax), \\ H(x) = \int_{-\infty}^x \frac{2 \sin(y)}{y}dy, \qquad H(-\infty) = 0, H(+\infty) = C$$ where for some reason $C = 2\pi$
If $\phi,\phi'$ are $L^1$ then $$\lim_{a \to \infty}\int_{-\infty}^\infty h_a(x) \phi(x) dx = -\lim_{a \to \infty}\int_{-\infty}^\infty H(ax) \phi'(x) dx\\ = -\int_{-\infty}^\infty H(+\infty x) \phi'(x) dx = -\int_0^\infty C \phi'(x) dx= 2\pi \phi(0)$$ ie. in the sense of distributions $$\int_{-\infty}^\infty e^{ik x}dk \overset{def}=\lim_{a \to\infty} h_a = 2\pi \delta$$
Note how this proves the Fourier inversion theorem.