Let us consider a spherical wave going like
$\phi(r,t)=a_0e^{ikr\cos(\theta)-i\omega t+i\psi}\frac{1}{r}$
typical of a radiation field. In your case, one neglect the spatial dependence and finally gets, taking the real part,
$\phi(r,t)=a_0\cos({\omega t+\psi})\frac{1}{r}.$
As you know, you have to take the square of it to get energy density and then integrate on the volume. So,
$W=\int_V d^3x\phi^2(r,t)$
and we assume that the volume is finite and spherical with radius $R$. But now, in spherical coordinates, we have $d^3x=r^2drd\Omega$ and you can immediately integrate on the solid angle obtaining $4\pi$. This will give
$W=4\pi\int_0^R r^2dra_0^2\frac{1}{r^2}\cos^2({\omega t+\psi})=4\pi Ra_0^2\cos^2({\omega t+\psi})$
where you see that the volume element compensates your singular behavior giving a finite energy as one physically should expect. If you have in mind a lamp you will notice that the radiated energy does not burn you out.