The function you suggest is perfectly fine. It's just a question of filling in the details.
For all positive $t$, define
$$
g_t(z) := \frac{t}{\sqrt{\pi}} e^{-t^2z^2}.
$$
For all $t$, $g_t$ is a holomorphic function defined over the whole of $\Bbb{C}$ (in other words, it is entire), its restriction to the real line is positive, and its integral over the real line is equal to $1$. Furthermore, these functions all decay exponentially over the quadrants $\left\{-\pi/4<\text{Arg}(z)<\pi/4\right\}$ and $\left\{3\pi/4<\text{Arg}(z)<5\pi/4\right\}$ of the complex plane. In particular, for all $r>0$, if $\left|z\right|>r$ and if $\left|\text{Arg}(z)\right|<\frac{\pi}{6}$ (or if $\left|\text{Arg}(z)-\pi\right|<\frac{\pi}{6}$), then,
$$
\left|g_t(z)\right| \leq \frac{t}{\sqrt{\pi}}e^{-t^2 r^2/2}.
$$
We now define, for example
$$
f(z) = \sum_{n\in\Bbb{Z}\setminus\left\{0\right\}} \frac{1}{n^2}g_{n^3}(z-n).
$$
Observe that $f$ is unbounded. However, it follows from the above inequality that $f$ converges uniformly over every compact subset of $\Bbb{C}$. It is therefore also an entire function, and in particular is analytic over $\Bbb{R}$. Furthermore, since $\sum_{n\in\Bbb{Z}\setminus\left\{0\right\}}\frac{1}{n^2}$ is finite, $f$ also has finite integral, as desired.