Let $E:=\cup_{n=1}^\infty [n^2+n\sqrt{2},n^2+n\sqrt{2}+1]$. Clearly it has Banach density 0.
Let $f$ be a $T$-periodic function, $T>0$, $f\in L^1[0,T]$. It is convenient to suppose that $T>1$ (that may always be achieved by replacing $T$ to a multiple of $T$). Subtracting average, we may assume that $\int_0^T f=0$. Then $|\int_a^bf|\leqslant \int_0^T |f|:=C<\infty$ for all real $a<b$. For large $x$ the set $E\cap [0,x]$ has measure $\sqrt{x}+o(\sqrt{x})$, so we want to prove that $\int_{E\cap [0,x]}f(x)dx=o(\sqrt{x})$. Let $[0,x]$ contain $N$ full intervals $[n^2+n\sqrt{2},n^2+n\sqrt{2}+1]$, and possibly a part of $(N+1)$-st such interval. An integral of $f$ over the part of this $(N+1)$-st interval is bounded in absolute value by a constant $C$, by the above observation. So, we need to prove that
$$
\frac1N\sum_{n=1}^N \int_{n^2+n\sqrt{2}}^{n^2+n\sqrt{2}+1}f(x)dx=o(1).\tag{1}
$$
Left hand side of (1) may be rewritten as $\int_0^T h(x)f(x)$, where
$$
h(x)=\frac1N\sum_{n=1}^N\sum_{k=-\infty}^\infty \mathbf{1}(x+kT\in [n^2+n\sqrt{2},n^2+n\sqrt{2}+1]).
$$
Since $0\leqslant h(x)\leqslant 1$, by Lebesgue dominated convergence theorem it suffices to prove that pointwise we have $h(x)\to \frac1{T}$. For this goal, we rewrite (for fixed $x$)
$$
h(x)=\frac1N \sum_{n=1}^N\mathbf{1}(n^2+n\sqrt{2}\in [x-1,x] \pmod T),
$$
where $[x-1,x]$ is the arc of length 1 on the circle $\mathbb{R}/T\mathbb{Z}$ of length $T$. Since the polynomial $(n^2+n\sqrt{2})/T$ has at least one non-free irrational coefficient, this follows from Weyl equidistribution theorem (the original paper is Weyl, H. Uber die Gleichverteilung von Zahlen mod. Eins. Math. Ann. 77(3):313–352, 1916, now it is widely reproduced in literature).