$$-\sin\left(8\pi\left|x-2\left\lfloor\frac{x}{2}\right\rfloor-1\right|\right)$$ seems to work...
How to make your own periodic function
Questions like this or this keep turning up here, so for completeness, I'm documenting a recipe for constructing periodic functions.
The first thing you need to do is to figure out your "repeating unit"; that is, you should have some function $f(x)$ defined over some interval $[a,b]$ as a starting point, such that the final function is a periodically extended version for $x$ outside the interval $[a,b]$. (I will be assuming for the rest of this answer that $f(a)=f(b)$; otherwise, as with this answer, some care and finesse is required if the behavior at the function's jump discontinuities matters to you.)
The key ingredient for making your custom periodic function is the sawtooth, i.e. the function $x-\lfloor x\rfloor $. This has the property that it is equal to $x$ in the interval $[0,1)$, and repeats thereafter.
From this, the basic sawtooth can be rescaled and translated like so:
$$x-(b-a)\left\lfloor\frac{x-a}{b-a}\right\rfloor$$
This function now has the property of being equal to $x$ within the interval $[a,b)$, and repeats thereafter. Thus, if you want your function to be a repeated version of the function $f(x)$ over the interval $[a,b]$, and $f(a)=f(b)$,
$$f\left(x-(b-a)\left\lfloor\frac{x-a}{b-a}\right\rfloor\right)$$
is the desired periodic function.
Alternatively, since
$$x\bmod y=x-y\left\lfloor\frac{x}{y}\right\rfloor$$
the modulo function can also be used to represent the sawtooth.
(For some purposes, one might need to multiply the periodic function thus obtained with an appropriate square wave factor like in Zev's answer to the semicircle question, but I shan't be considering that filigree here.)
Going back to the OP's problem, consider the function $-\sin(8\pi |x|)$ (alternatively, $-\mathrm{sign}(x)\sin(8\pi x)$):

This looks very much like one period of the OP's required function, except that it is defined over the interval $[-1,1]$ and not over $[0,2]$. A translation fixes that: $-\sin(8\pi |x-1|)$. One now replaces the $x$ with a sawtooth over $[0,2)$ like so:
$$-\sin\left(8\pi\left|\left(x-(2-0)\left\lfloor\frac{x-0}{2-0}\right\rfloor\right)-1\right|\right)$$
and simplifying that yields the function I gave earlier.