How about integration by parts...
$$ \int_0^{2\pi} f(x) \cos x\,{\rm d}x = \left[ f(x)\sin x \right]_{x=0}^{x=2\pi}-\int_0^{2\pi} \sin x\,f'(x)\,{\rm d}x$$
$$ \left[ f(x)\sin x \right]_{x=0}^{x=2\pi} = 0$$ $$ f'(x) \leq 0 $$
So now you have to prove that
$$ -\int_0^{2\pi} \sin x\,f'(x)\,{\rm d}x \ge 0$$ or expanded as
$$ \int_0^{2\pi} \sin x\,f'(x)\,{\rm d}x = \int_0^{\pi} \sin x\,f'(x)\,{\rm d}x +\int_\pi^{2\pi} \sin x\,f'(x)\,{\rm d}x \leq 0$$
Since $\sin x$ is positive between $x=0\ldots\pi$ and negative otherwise the above can be written as
$$ \int_0^{\pi} \sin x\,f'(x)\,{\rm d}x -\int_0^{\pi} \sin x\,f'(x+\pi)\,{\rm d}x \leq 0$$
or
$$ \int_0^{\pi} \sin x\,\left(f'(x)-f'(x+\pi)\right)\,{\rm d}x \leq 0 $$
Which is true only if $f'(x)-f'(x+\pi)\leq0$ for $x=0\ldots\pi$. If $f(x)$ is decreasing with negative slope then $|f'(\pi)|\leq|f'(0)|$ and thus the above is true.