Consider a one-dimensional integral $$I(g)=\int dx\, e^{-x^2-gx^4}$$ One can formally expand it perturbatively order by order in $g$ so that $$I(g)=\left<1\right>-g\left<x^4\right>+\frac{g^2}{2}\left<x^8\right>+O(g^3)$$ where $\left<f(x)\right>:=\int dx\, e^{-x^2}f(x)$. This expansion is asymptotic but that's fine. I thought that basically the same procedure applies to QFT. Consider $$Z(g)=\int \mathcal{D}\phi\,\, e^{-\int (\nabla \phi)^2+g\phi^4}$$ and expand it formally in $g$ $$Z(g)= \left<1\right>-g\left<\phi^4\right>+\frac{g^2}{2} \left<\phi^8\right>+O(g^3)$$ where $\left<f(\phi)\right>:=\int \mathcal{D}\phi\,\, e^{-\int (\nabla \phi)^2}f(\phi)$. My problem with that expression is that it involves correlation functions at coincident points (which then need to be integrated over space). But correlators at coincident points are infinite.
Are these superficial infinities related to the renormalization necessary in QFT? Or this is a different issue (I believe it is)? How the formulas should be corrected then?