1) Look at the formula that provides us the discrete Fourier transform of the greatest common divisor from the section Fourier transform of this Wikipedia. Let then $\varphi(n)$ the Euler's totient function.
2) And let $N_m$ the primorial of order $m$ and $\gamma$ the Euler-Mascheroni's constant and we know the equivalence to the Riemann's Hypothesis due to Nicolas from [1], or from this answer of Will Jagy in this Mathematics Stack Exchange.
Then, if there are no mistakes, combining both statements 1) and 2) one has the inequality $$\sum_{k=1}^{N_m}\gcd(k,N_m)\cos^2\left(\pi\frac{k}{N_m}\right)<\frac{N_m}{e^\gamma\log\log N_m}+\sum_{k=1}^{N_m}\gcd(k,N_m)\sin^2\left(\pi\frac{k}{N_m}\right),$$ since $\cos(2\alpha)=\cos^2\alpha-\sin^2\alpha$. Thus combing with the Pythagorean theorem $\cos^2\alpha=1-\sin^2\alpha$ and the Theorem 3.1, see page 4 of [2], that is the specialization $n=N_m$ and it implies $\omega(N_m)=m$ one get an upper bound for LHS, I am saying that we can compute the bound here $$\sum_{k=1}^{N_m}\gcd(k,N_m)\cos^2\left(\pi\frac{k}{N_m}\right)\leq \text{upper bound}$$ as a function of $m$, well on assumption of the Riemann Hypothesis.
My goal is learn more and encourage myself to study more mathematics. I would like to know the answer of this
Question. Is it possible to deduce unconditionally an upper bound, as a function of $m\geq 1$ (is not required a very good upper bound, only good calculations and details to get a bound for large values of $m$), of our sum $$\sum_{k=1}^{N_m}\gcd(k,N_m)\cos^2\left(\pi\frac{k}{N_m}\right)\leq \text{upper bound as a function of }m?$$ Thanks in advance.
As simple remarks I know that each summand $\gcd(k,N_m)\cos^2\left(\pi\frac{k}{N_m}\right)$ is positive and equal to $\gcd(\operatorname{rad}(k),N_m)\cos^2\left(\pi\frac{k}{N_m}\right)$, where $\operatorname{rad}(n)$ is the radical of the integer $n\geq 1$.
References:
[1] J. Nicolas, Petites valeurs de la fonction d'Euler, J. Number Theory 17 (1983), 375-388.
[2] Kevin A. Broughan, The gcd-sum Function, Journal of Integer Sequences, Vol. 4 (2001), Article 01.2.2. See the Issue 2, here in the free access of the volume.
This would be too long for a comment.
Slightly rearranging your bound gives$$2\sum_{k=1}^{N_m}\gcd(k,N_m)\cos^2\left(\pi\frac{k}{N_m}\right)=\varphi(N_m)+\sum_{k=1}^{N_m}\gcd(k,N_m)$$ So we have to estimate $\varphi(N_m)$ and $\sum_{k=1}^{N_m}\gcd(k,N_m)$.
The latter term is Pillai's arithmetical function. By simple double counting,$$\sum_{k=1}^{N_m}\gcd(k,N_m)=\sum_{n|N_m}n\varphi(N_m/n)=\prod_{i=1}^m(2p_i-1)$$and this is far bigger than $\varphi(N_m)=\prod_{i=1}^m(p_i-1)$.