Deriving the value of $\int\limits_{-\infty}^\infty \frac{\sin(x)}{x} dx$ by way of Fourier transformation Recall that the Fourier transform on the Schwartz space $\mathcal{S}(\mathbb{R}^d, \mathbb{C})$ is defined by $$\hat{f}(\xi) = \int\limits_{\mathbb{R}^d} f(x) e^{-2\pi i \langle x \mid \xi \rangle} dx$$ where $dx$ denotes integration wrt. the Lebesgue measure. Now one can show, that the Fourier transform is an isometric automorphism on the Schwartz space $\mathcal{S}(\mathbb{R}^d, \mathbb{C})$ (with inverse $\check{f}(\xi) = \hat{f}(-\xi)$) and since the Schwartz space $\mathcal{S}(\mathbb{R}^d, \mathbb{C})$ is dense in $L^2(\mathbb{R}^d, \mathbb{C})$ we may extend the Fourier transform (by utilization of Cauchy sequences and completeness of $L^2$) to an isometric automorphism $$\mathfrak{F} \colon L^2(\mathbb{R}^d, \mathbb{C}) \to L^2(\mathbb{R}^d, \mathbb{C})$$ In particular one can verify, that if $f \in L^1(\mathbb{R}^d, \mathbb{C}) \cap L^2(\mathbb{R}^d, \mathbb{C})$, then $$\mathfrak{F}(f)(\xi) = \int\limits_{\mathbb{R}^d} f(x) e^{-2\pi i \langle x \mid \xi \rangle} dx$$
In the case where $d = 1$ we set $L^p(\mathbb{R}, \mathbb{C}) = L^p$ for $p \geq 1$ and we now consider a specific example: Look at the characteristic function $f = \chi_{[-1,1]}$ of the interval $[-1,1]$. Then clearly $f \in L^1 \cap L^2$, so by what we have referred to earlier we know that $$\mathfrak{F}{f}(\xi) = \int\limits_{\mathbb{R}} f(x) e^{-2\pi i \xi x} dx = \frac{\sin(2\pi \xi)}{\pi \xi}$$
Many resources now claim, that it is justified to take the inverse Fourier transform of $\mathfrak{F}f$ in the sense that $$f(\xi) = \int\limits_{\mathbb{R}} \frac{\sin(2\pi x)}{\pi x} e^{2 \pi i x \xi} dx$$ and upon setting $\xi = 0$ we obtain $$\pi = \int\limits_{\mathbb{R}} \frac{\sin(y)}{y} dy$$
However it is very well known, that $\mathfrak{F}f \notin L^1$ and that the Lebesgue integral over $\mathbb{R}$ of $\frac{\sin(y)}{y}$ doesn't exist.

I guess as this result only makes sense for a Fourier transform wrt. the improper Riemann integral I would be curious for references, or even better for a write-up proof on here, as to why this is justified. I would also like to know if there is some connection between the (extended) inverse Fourier transform restricted to $\mathfrak{F}(L^1 \cap L^2)$ and the improper Riemann integral, i.e. is it always true, that $$\forall f \in \mathfrak{F}(L^1 \cap L^2) \colon \mathfrak{F}^{-1}(f)(\xi) = \int\limits_{-\infty}^\infty f(x) e^{2\pi i \xi x} dx$$ where the RHS is now to be understood as an improper Riemann integral.

 A: A solution using Fourier transforms of distributions
The Fourier transform used here is
$$
\mathcal{F}\{f(x)\} = \int_{-\infty}^{\infty} f(x) e^{-i\xi x} dx.
$$
First we notice that
$$
\mathcal{F}\{\chi_{[-1,1]}(x)\} = \int_{-\infty}^{\infty} \chi_{[-1,1]}(x) e^{-i\xi x} dx = 2\frac{\sin\xi}{\xi},
$$
where $\chi_{A}$ is the indicator function of the set $A$.
Here the integral is well-defined so we haven't yet needed distributions.
But we get problems if we want to do the Fourier transform of $\frac{\sin x}{x}$ using integrals. We can however treat $\frac{\sin x}{x}$ as a distribution, and by the Fourier inversion theorem (rule 105), which is also valid for distributions, the above result implies that
$$
\mathcal{F}\{2\frac{\sin x}{x}\} = 2\pi \, \chi_{[-1,1]}(-\xi)
$$
Thus, formally, abusing notation,
$$
\int_{-\infty}^{\infty} \frac{\sin x}{x} dx
= \left. \int_{-\infty}^{\infty} \frac{\sin x}{x} e^{-i\xi x} dx \right|_{\xi=0}
= \left. \mathcal{F}\{ \frac{\sin x}{x} \} \right|_{\xi=0}
= \pi \, \chi_{[-1,1]}(0)
= \pi.
$$
There is a problem with the last step. The expression $\pi \, \chi_{[-1,1]}(\xi)$ is here not defined pointwise, but should be treated as a distribution. This can be fixed by introducing a smoothing factor:
$$
\int_{-\infty}^{\infty} \frac{\sin x}{x} dx
:= \lim_{\epsilon \to 0} \left. \mathcal{F}\{ e^{-\epsilon x^2} \frac{\sin x}{x} \} \right|_{\xi=0}
= \lim_{\epsilon \to 0} \left. \frac{1}{2\pi} \left( \mathcal{F}\{ e^{-\epsilon x^2} \} * \mathcal{F}\{ \frac{\sin x}{x} \} \right) \right|_{\xi=0}
$$
Here, $\mathcal{F}\{ e^{-\epsilon x^2} \}$ is a smooth function so the convolution $\mathcal{F}\{ e^{-\epsilon x^2} \} * \mathcal{F}\{ \frac{\sin x}{x} \}$ is also a smooth function. Furthermore,
$$
\left. \frac{1}{2\pi} \left( \mathcal{F}\{ e^{-\epsilon x^2} \} * \mathcal{F}\{ \frac{\sin x}{x} \} \right) \right|_{\xi=0} 
= \left. \frac{1}{2\pi} \int_{-\infty}^{\infty} \mathcal{F}\{ e^{-\epsilon x^2} \}(\xi-\eta) \, \mathcal{F}\{ \frac{\sin x}{x} \}(\eta) \, d\eta \right|_{\xi=0} \\
= \frac{1}{2\pi} \int_{-\infty}^{\infty} \mathcal{F}\{ e^{-\epsilon x^2} \}(-\eta) \, \mathcal{F}\{ \frac{\sin x}{x} \}(\eta) \, d\eta 
= \frac{1}{2\pi} \int_{-\infty}^{\infty} \sqrt{\frac{\pi}{\epsilon}} e^{-\eta^2/(4\epsilon)} \, \pi\,\chi_{[-1,1]}(\eta) \, d\eta \\
= \frac{1}{2} \sqrt{\frac{\pi}{\epsilon}} \int_{-\infty}^{\infty} e^{-\eta^2/(4\epsilon)} \, \chi_{[-1,1]}(\eta) \, d\eta 
= \frac{1}{2} \sqrt{\frac{\pi}{\epsilon}} \int_{-1}^{1} e^{-\eta^2/(4\epsilon)} \, d\eta 
= \{ \eta = 2\sqrt{\epsilon}\kappa \} \\
= \frac{1}{2} \sqrt{\frac{\pi}{\epsilon}} \int_{-1/(2\sqrt{\epsilon})}^{1/(2\sqrt{\epsilon})} e^{-\kappa^2} \, 2\sqrt{\epsilon}\,d\kappa 
= \sqrt{\pi} \int_{-1/(2\sqrt{\epsilon})}^{1/(2\sqrt{\epsilon})} e^{-\kappa^2} \, \,d\kappa \\
\to \sqrt{\pi} \int_{-\infty}^{\infty} e^{-\kappa^2} \, \,d\kappa 
= \pi
.
$$
