Since the Möbius function satisifies $$\mu(n)=\sum_{\substack{1\leq h\leq n\\(h,n)=1}}e^{2\pi i\frac{h}{n}},$$I define the (is a sequence for $n\geq 1$, I omit the subscript and write $f(z)$ instead of $f_n(z)$) function $$f(z)=\sum_{\substack{1\leq h\leq n\\(h,n)=1}}\frac{e^{2\pi i\frac{h}{n}z}}{z^2+1}.$$
I've followed the strategy in (spanish) Ejemplo 16, in page 10, from this course notes, Universidad Autónoma de Madrid to compute for $R$ enough large and $C_R$ the semicircle in the upper half plane that by Cauchy and Residues Theorem $$\int_{-R}^{R}+\int_{C_R}=\pi\sum_{\substack{1\leq h\leq n\\(h,n)=1}}e^{-2\pi i\frac{h}{n}}.$$ (And previous sum should be previous is equal to the Möbius function since $$\Re\left(\sum_{\substack{1\leq h\leq n\\(h,n)=1}}e^{2\pi i\frac{h}{n}}\right)=\sum_{\substack{1\leq h\leq n\\(h,n)=1}}\cos(-2\pi \frac{h}{n})=\Re\left(\sum_{\substack{1\leq h\leq n\\(h,n)=1}}e^{-2\pi \frac{h}{n}}\right)$$ holds, since this arithmetical funciton is real and the cosine function is even.)
Following the calculation one gets the estimation of the integrand as $$|f(z)|\leq \sum_{\substack{1\leq h\leq n\\(h,n)=1}}\frac{e^{-2\pi \frac{h}{n}R \sin t}}{R^2-1}$$ for the usual parametrisation and using the triangle inequality. Thus $$\left|\int_{C_R}f(z)dz\right|\leq\frac{R}{R^2-1}\sum_{\substack{1\leq h\leq n\\(h,n)=1}}\int_0^\pi e^{-2\pi \frac{h}{n}R \sin t} dt.$$
Question. And now I need a modified Jordan's Lemma (in the course notes Lema de Jordan) to compute previous as $$\left|\int_{C_R}f(z)dz\right|\leq\text{something}\to 0$$ as $R$ tends to infinity. Can you do this step?
Then I could finish this simple exercise to refresh complex integration, if there are no mistakes in my calculations, and sates that for this (sequence) function $$\int_{-\infty}^\infty \sum_{\substack{1\leq h\leq n\\(h,n)=1}}\frac{e^{-2\pi \frac{h}{n}x}}{x^2+1}dx=\pi\mu(n).$$ In this last step one can deduce also the corresponding integral for the cosine function in the integrand when one takes the real part of previous identity.
Thus can you say if there were some mistake or can you improve some fact and answer previous Question 1 to know how apply a Jordan Lemma to finish the exercise? Many thanks.
You are mixing up factors of i. There are different ways to write a correct formula, e.g.:
$$\oint_C \sum_{\substack{1\leq h\leq n\\(h,n)=1}}\frac{e^{\pm \,2\pi \frac{h}{n}z}}{z^2+1}dz=\pi\mu(n)$$
when $C$ is a contour encircling $i$ but not $-i$. Depending on the choice of sign in the exponential you need either ${\rm Re}\; z$ bounded from below or from above along the contour for the integral to be convergent so you will not be able to relate this to an integral over ${\Bbb R}$. Note that in your 3rd formula there is a factor of i too much in the exponent. The following is correct given the definitions in your text:
$$\int_{-R}^{R}+\int_{C_R}=\pi\sum_{\substack{1\leq h\leq n\\(h,n)=1}}e^{-2\pi \frac{h}{n}}$$
The second equality in your 4th equation is not correct (and not justified by your text):
What is your aim with these calculations?