Using a cosine identity, we have
$\cos x - \cos y = -2\sin \left(\dfrac{x+y}{2}\right) \sin \left(\dfrac{x-y}{2}\right)$
Then, make a change of variables: $u = (x+y)/2$ and $v = (x-y)/2$.
$\cos x - \cos y = -2\sin u \sin v$
So, in the interim, we are searching for the greatest $\delta^*$ such that if $|v| < \delta^*$, we have $|\sin u \sin v| < \sqrt{2}/2$. That is, we are searching for a least upper bounds. So, we look for the smallest possible $v$ such that $|\sin u \sin v| = \sqrt{2}/2$.
Note that $|\sin u \sin v|$ is maximized along the lines $u = \pi/2$ and $u = -\pi/2$, which permits us to write
$|\sin u \sin v| \leq |\sin v|$ (with equality when $u = \pm \pi/2$)
As $\sin v = \sqrt{2}/2$ when $v = \pi/4$, $v = \pi/4$ is our least upper bound $\delta^*$. Thus, if we choose $\delta^* = \pi/4$, we have that
if $|v| < \delta^*$, then $|\sin u \sin v| \leq |\sin v| < \sqrt{2}/2$
As $v = (x-y)/2$, $x-y=2v$, and the corresponding upper bounds $\delta$ for $|x-y|$ gives $\delta = \pi/2$.
Note that if we choose $(x,y)$ such that $|x-y|=\delta = \pi/2$, we have that the points $(x,y) = (3\pi/4,\pi/4)$ and $(x,y) = (-3\pi/4,-\pi/4)$ yield $|\cos x - \cos y| = \sqrt{2}/2$, so we can be sure that this $\delta$ is maximized.