Let $$I_k:=\int_{|x-k\pi|<1/k}x^4\exp(-2x^8\sin^2 x)\,dx.$$ Then, as $k\to\infty$, $$I_k\asymp k^4\int_{|x-k\pi|<1/k}\exp\{-(2+o(1))(k\pi)^8\sin^2 x\}\,dx \\ =k^4\int_{|x|<1/k}\exp\{-(2+o(1))(k\pi)^8\sin^2 x\}\,dx \\ =k^4\int_{|x|<1/k}\exp\{-(2+o(1))(k\pi)^8 x^2\}\,dx \asymp1,$$ whence $$\int_{-\infty}^\infty f(x)^2\,dx\ge\sum_{k=1}^\infty I_k=\infty.$$ So, $f$ is not square-integrable.