Actually, for this question, there is no need to consider separately the cases where the function is constant vs when it isn't.
By the way, your indexing for the union is weird. It might be easier to just write it out explicitly:
\begin{equation}
\Bbb{R} = \dots \cup [x-2d, x-d] \cup [x-d, x] \cup [x, x+d] \cup [x+d, x+2d] \dots
\end{equation}
This, although tedious, gives a clear meaning of what you intend to say (and I'm sure most people will be fine with the use of $\dots$ because the intended meaning is clear). This is better than giving an incorrect statement, because currently what you have written does not make sense.
However, if you really want to write $\Bbb{R}$ as an infinite union, you could do something like:
\begin{equation}
\Bbb{R} = \bigcup_{n \in \Bbb{Z}} \left[x+nd, x+(n+1)d \right]
\end{equation}
Added Remarks:
The idea of your proof is certainly correct (and if you make the notational change I suggested above, it will certainly constitute a rigorous proof), but you should note that there is no need to consider an arbitrary $x$, simply pick $x=0$.
Best Answer
Even though you're trying to prove the statement, it's still profitable to start by searching for a counterexample. Think about what could go wrong, and keep trying to trap the counterexample into a corner until you've either ruled it out or found it.
We know that $f$ is continuous on the open sub-interval $(a,b)$. So if you define a smoothed function $g:[a,b]\to\mathbb R$ by $g(a)=\lim_{x\to a}f(x)$, $g(b)=\lim_{x\to b}f(x)$, and $g(x)=f(x)$ for $a<x<b$, then $g$ is a continuous function on $[a,b]$. By the extreme value theorem, $g$ does attain a minimum.
If the argmin of $g$ is in $(a,b)$, then $f$ attains a minimum as well: either at the same place, or at $a$ or $b$. So the only remaining way to find a counterexample to the claim must take this form, without loss of generality:
Now your goal is either to prove that that's impossible -- no matter what happens to $f(0)$, as long as it's convex, $f$ still attains a minimum -- or to provide a counterexample of that form.