If you use the Cartesian coordinate, you should recall the definition of "improper integral". Let me give you a simpler example here, consider
$\int_0^1\frac{1}{\sqrt{x}}dx$,
the integrand approaches infinity as $x\to 0$, however, the "improper integral " defines it as a limit, i.e.,
$\int_0^1\frac{1}{\sqrt{x}}dx=\lim_{\epsilon\to0}\int_{\epsilon}^1\frac{1}{\sqrt{x}}dx=\lim_{\epsilon\to0}2\sqrt{x}\big|_{\epsilon}^1=2$,
thus the integral will still give you a finite value.