In the case of your example $f(x):=x+\cos x$ you can make use of the periodicity of $\cos$. Note that
$$f(x+2\pi)=f(x)+2\pi\qquad(-\infty<x<\infty)\ .\tag{1}$$
Assume that you have worked out a decent approximation $g$ of $f^{-1}$ in the interval $[f(0),2\pi]$: $$g:\quad \bigl[f(0),f(2\pi)]\to[0,2\pi],\quad y\mapsto g(y)\ ,$$ say a polynomial in $y$. This means that
$$g: \quad[1,2\pi +1]\to[0, 2\pi]\ ,$$
and
$$g\bigl(f(x)\bigr)\approx x\qquad(0\leq x\leq 2\pi)\ .$$ You are satisfied with the precision; in particular $g\bigl(1\bigr)=0$ and $g(2\pi+1)=2\pi$.
For an arbitrary $y\in{\mathbb R}$ let $k_y:=\bigl\lfloor{y\over2\pi}\bigr\rfloor$. As a consequence of $(1)$ you then have the approximation
$$f^{-1}(y)\approx g(y-2\pi k_y)+2\pi k_y\qquad(-\infty<y<\infty)\ .$$