Assuming $f$ is defined for all $x\in\mathbb{R}$. First, note that for any $x$,
$$
f(x) = \sin\!\left(x+\frac{\pi}{2}\right)-2f\!\left(\frac{\pi}{3}\right) = \cos x -2f\!\left(\frac{\pi}{3}\right)
$$
so it only remains to compute $f\!\left(\frac{\pi}{3}\right)$. From the expression above
$$
f\!\left(\frac{\pi}{3}\right) = \cos \frac{\pi}{3} -2f\!\left(\frac{\pi}{3}\right) = \frac{1}{2} -2f\!\left(\frac{\pi}{3}\right)
$$
and therefore rearranging the terms gives $f\!\left(\frac{\pi}{3}\right) = \frac{1}{6}$. Putting it all together,
$$
\forall x\in \mathbb{R}, \quad f(x)=\cos x - \frac{1}{3}\;.
$$
(It then only remains to check this expression satisfies the original functional equation, to be certain. It does; but even a quick sanity check for $x=0$, $x=\frac{\pi}{2}$ and $x=\pi$ will be enough to build confidence.)