That answer of mine that you link to is not an actual proof of the Inversion Theorem - it only works for "suitable" $f$, where "suitable" is left undefined. Here's an actual proof.
Just to establish where we're putting the $\pi$'s, we define $$\hat f(\xi)=\int f(t)e^{-it\xi}\,dt.$$
$L^1$ Inversion Theorem. If $f\in L^1(\Bbb R)$ and $\hat f\in L^1(\Bbb R)$ then $f(t)=\frac1{2\pi}\int\hat f(\xi)e^{i\xi t}\,d\xi$ almost everywhere.
We use that periodization argument to establish the theorem under stronger hypotheses:
Partial Inversion Theorem. If $f,f',f''\in L^1(\Bbb R)$ then $\hat f\in L^1$ and $f(t)=\frac1{2\pi}\int\hat f(\xi)e^{it\xi}\,d\xi$.
To be explicit, we're assuming that $f$ is differentiable, $f'$ is absolutely continuous, and $f',f''\in L^1$.
Note first that $(1+\xi^2)\hat f(\xi)$ is the Fourier transform of $f-f''$ (see Details below), so it's bounded: $$|\hat f(\xi)|\le\frac c{1+\xi^2}.\tag{*}$$
For $L>0$ define $$f_L(t)=\sum_{k\in\Bbb Z}f(t+kL).$$Then $f_L$ is a function with period $L$, and as such it has Fourier coefficients $$c_{L,n}=\frac1L\int_0^Lf_L(t)e^{-2\pi i n t/L}\,dt.$$
Inserting the definition of $f_L$ and using the periodicity of the exponential shows that in fact $$c_{L,n}=\frac1L\hat f\left(\frac{2\pi n}L\right).$$So ($*$) above shows that $\sum_n|c_{L,n}|<\infty$; hence $f_L$ is equal to its Fourier series: $$f_L(t)=\frac1L\sum_n\hat f\left(\frac{2\pi n}L\right)e^{2\pi i nt/L}.$$That's a Riemann sum for a certain integral; we establish convergence by noting that $$\frac1L\sum_n\hat f\left(\frac{2\pi n}L\right)e^{2\pi i nt/L}=\frac1{2\pi}\int g_L(\xi)\,d\xi,$$where $$g_L(\xi)=\hat f\left(\frac{2\pi n}L\right)e^{2\pi i nt/L}\quad(\xi\in[2\pi n/L,2\pi(n+1)/L)).$$Since $\hat f$ is continuous, DCT (using ($*$) for the D) shows that $$\lim_{L\to\infty}\int g_L=\int\hat f(\xi)e^{i\xi t}\,d\xi.$$
So we're done if we can show that $f_L\to f$ almost everywhere as $L\to\infty$. In fact we don't have to worry about whether/how this follows from the hypotheses: It's clear that $f_L\to f$ in $L^1_{loc}$ for every $f\in L^1$, hence some subsequence tends to $f$ almost everywhere.
Deriving IT from PIT is very simple. Say $(\phi_n)$ is an approximate identity; in particular $\phi_n\in C^\infty_c$, the support of $\phi_n$ shrinks to the origin, $||\phi_n||_1=1$ and $\hat\phi_n\to1$ pointwise. Let $f_n=f*\phi_n$. Then $f_n'=f*\phi_n'$, so $f'\in L^1$. Similarly for $f_n''$, so PIT applies to $f_n$. But $f_n\to f$ almost everywhere and DCT shows that $||\hat f_n-\hat f||_1\to0$.
Details, in answer to a comment. Note that here when I say $f,f'\in L^1$ I mean that $f$ is absolutely continuous and $f'\in L^1$.
Proposition. If $f,f'\in L^1(\Bbb R)$ then $\widehat{f'}(\xi)=-i\xi\hat f(\xi)$.
(Unless it's $i\xi\hat f(\xi)$; I never remember - here it doesn't matter since $(-1)^2=1$.)
Of course the proposition is just an integration by parts. Then we have to justify integration by parts in this context and worry about the boundary terms. Seems more instructive to show that
Given $f\in L^1$, the following are equivalent: (i) $f'\in L^1$, (ii) $f$ is "differentiable in $L^1$".
Regarding what (ii) means, see Lemma 2 below. I like to go this way because first, it's cute: "$f'\in L^1$ if and only if $f$ is differentiable in $L^1$", and second it seems to me to say something about what absolute continuity "really means". Anyway:
Exercise. If $f\in L^1$ then $\lim_{t\to0}\int|f(x)-f(x+t)|\,dx=0$.
(Hint: Wlog $f\in C_c(\Bbb R)$.)
Lemma 1. If $f\in L^1$ then $\lim_{h\to0}\int\left|f(x)-\frac1h\int_x^{x+h}f(t)\,dt\right|\,dx=0$.
Proof: $$\begin{align}\int\left|f(x)-\frac1h\int_x^{x+h}f(t)\,dt\right|\,dx
&=\int\left|\frac1h\int_0^h(f(x)-f(x+t))\,dt\right|\,dx
\\&\le\frac1h\int_0^h\int|f(x)-f(x+t)|\,dxdt.\end{align}$$
Apply the previous exercise and note that $\frac1h\int_0^h\epsilon=\epsilon$.
Lemma 2. If $f,f'\in L^1$ then $\lim_{h\to0}\int\left|f'(x)-\frac{f(x+h)-f(x)}{h}\right|\,dx=0$.
That is, if $f,f'\in L^1$ then $f$ is "differentiable in $L^1$". (We won't use the other implication...)
Proof: Write $\frac{f(x+h)-f(x)}{h}=\frac1h\int_x^{x+h}f'(t)\,dt$ and apply Lemma 1.
Another interesting/instructive version of "differentiable in $L^1$" that we won't use below:
Exercise. Suppose $f\in L^1$, and define $F:\Bbb R\to L^1(\Bbb R)$ by $F(t)(x)=f(x+t)$. Then (i) $f'\in L^1$ if and only if (ii) $F$ is differentiable.
Proof of the proposition: Work out the Fourier transform of the function $x\mapsto\frac{f(x+h)-f(x)}{h}$. Let $h\to0$ (apply Lemma 2).
I think that you are looking for the Kakutani Representation Theorem for harmonic functions: Let $B$ be a Brownian motion in $\mathbb{R}^n$ and let $U$ be a bounded open domain in $\mathbb{R}^n$. Let $x$ in $U$ and consider the Brownian motion $X(\cdot) = x + B(\cdot)$ starting at $x$. Let $\tau_x = \inf\{t\geq0\mid X(t) \notin U\}$ be the first hitting time of $\partial U$, which is finite a.s. Then for every continuous function $g:\partial U \to \mathbb{R}^n$ we have that
$$
u(x) = E\big{[}g(X(\tau_x))\big{]}
$$
where $u$ is the unique solution to the Laplace equation in $U$ with boundary condition equal to $g$.
From this representation, note that the Mean Value Theorem for harmonic functions follows from the isotropy of the Brownian motion and the uniqueness of the solution to the Dirichlet problem. In the case $n=2$, you can use essentially the same argument to prove the Cauchy Integral Formula. Or, alternatively, you can deduce it from the Mean Value Theorem as in the answer here. (Once established for circles you can use the homotopy invariance of the integrals of holomorphic functions to extend the formula for arbitrary simple curves.)
Finally, regarding to how to compute an integral using Brownian motion, I recommend you take a look at the Feynman-Kac formula, which is one of the most beautiful results in mathematics that link two different worlds. It connects the worlds of Probability Theory and PDEs in a similar fashion to the Kakutani Representation Theorem above. Recall that the expected value of a random variable is in fact an integral so you can use the Kakutani Representation Theorem and the Feynman-Kac Formula to compute integrals.
Best Answer
Solution using Fourier series
$$\begin{split} \int_{\mathbb R}\frac {|x|^p}{1+x^2}dx &= 2\int_0^{+\infty}\frac {x^p}{1+x^2}dx\\ &=2\left(\int_0^1\frac {x^p}{1+x^2}dx+\int_1^{+\infty}\frac {x^p}{1+x^2}dx\right)\\ &=\int_0^1\frac {u^{\frac p 2-\frac 1 2}}{1+u}du+\int_0^{1}\frac {y^{-\frac p2-\frac 1 2}}{1+y}dy \,\,\,\,\text{ with }u=x^2 \text{ and }y=\frac 1 {x^2} \end{split}$$ We thus need to compute, for $-1<\alpha<1$ $$\int_0^1\frac{v^{\alpha}}{1+v}dv =\int_0^1\sum_{n\in\mathbb N}(-1)^nv^{\alpha+n}dv=\sum_{n\in\mathbb N}(-1)^n\int_0^1v^{\alpha+n}dv=\sum_{n\in\mathbb N}\frac{(-1)^n}{\alpha+n+1}$$ In other words, $$\begin{split} \int_{\mathbb R}\frac {|x|^p}{1+x^2}dx &= \sum_{n\in\mathbb N}\frac{(-1)^n}{n+\frac p 2+\frac 1 2}+\sum_{n\in\mathbb N}\frac{(-1)^n}{n-\frac p 2+\frac 1 2}\\ &=\sum_{n\in\mathbb N}\frac{(-1)^n}{n-\frac p 2+\frac 1 2} + \sum_{n\in\mathbb N}\frac{(-1)^n}{-n+\frac p 2-\frac 1 2}\\ &= \sum_{n\in\mathbb N}\frac{(-1)^n}{n-\frac p 2+\frac 1 2} + \sum_{n\geq 1}\frac{(-1)^n}{-n-\frac p 2+\frac 1 2}\,\,\,\text{ (second index shifted by 1)}\\ &= \frac{1}{\frac 1 2 - \frac p 2} + (1-p)\sum_{n\geq 1}\frac{(-1)^{n+1}}{n^2-\left(\frac 1 2-\frac p 2\right)^2} \end{split}$$ This classic sum can be computed via Fourier series, among other ways. For $s\notin \mathbb Z$, define $f_s$ as the $2\pi$-periodic function defined by $f_s(t)=\cos(st)$ for $|t|<\pi$. You can verify that its Fourier series expansion is $$\cos{st} = \frac{\sin{\pi s}}{\pi s} \left [1+2 s^2 \sum_{n\geq 1}\frac{(-1)^{n+1} \cos{n t}}{n^2-s^2} \right ]$$ Evaluating at $t=0$ gives $$\frac{\pi}{\sin(\pi s)}=\frac 1 s + 2s\sum_{n\geq 1}\frac{(-1)^{n+1} }{n^2-s^2}$$ Thus, plugging in $s=\frac 1 2 - \frac p 2$, $$\int_{\mathbb R}\frac {|x|^p}{1+x^2}dx=\frac {\pi}{\cos\left(\frac {\pi p} 2\right)}$$