I saw a proof online there are infinitely many primes in $\mathbb{Z}$. The Euler product let's us factor the harmonic series:
$$ \prod \left( 1 - \frac{1}{p} \right) = \sum \frac{1}{n}$$
I wonder if this extends to $\mathbb{Z}[i]$. Joan Baez Week 216 of This Week's Finds defines the zeta function of number field as the sum over non-zero ideals basically:
$$ \zeta_{\mathbb{Z}[i]}(s) = \sum \frac{1}{(m^2 + n^2)^s} = \prod_{p \in \mathbb{Z}[i]} \left( 1 - \frac{1}{|p|^s} \right) $$
Here $2 = (1+i)(1-i)$ means that $2$ is ramified in $\mathbb{Z}[i]$. When does this converge?
$$ \sum_{m, n \geq 1} \frac{1}{(m^2 + n^2)^s} \approx \frac{\pi}{4}\int \frac{ dr }{r^{2s-1}} < \infty$$
This zeta function converges for $s > 1$ since we are adding more numbers. So for $s = 1$
$$ \zeta_{\mathbb{Z}[i]}(1) = \sum \frac{1}{m^2 + n^2} = \prod_{p \in \mathbb{Z}[i]} \left( 1 - \frac{1}{|p|} \right) = \infty $$
We should also check that $\mathbb{Z}[i]$ has unique factorization, because it has a Euclidean algorithm
Did we just prove $\mathbb{Z}[i]$ has infinitely many primes?
If that doesn't work, we show that $\zeta(2)$ is irrational. In fact $\zeta_{\mathbb{Z}}(2) = \frac{\pi^2}{6}$ but what about $\zeta_{\mathbb{Z}[i]}(2) $ ?
Your proof does indeed work (with a few minor corrections to your definition of $\zeta_{\mathbb Z[i]}$), and whilst it is not the easiest way to prove that $\mathbb Z[i]$ has infinitely many primes (see the other answer), the proof works in a much more general setting:
The proof is exactly the same as the proof in your question. Define the Dedekind zeta function $$\zeta_K(s) = \sum_{0\ne\mathfrak a \subset \mathcal O_K}N\mathfrak a^{-s},$$where $s\in \mathbb C$, the summation is over non-zero ideals of $\mathcal O_K$, and the norm of an ideal is defined by $$N\mathfrak a = \#\mathcal O_K/\mathfrak a.$$
Equivalently, $$\zeta_K(s) =\sum_{n=1}^\infty a_nn^{-s}$$ where $a_n=\#\{\mathfrak a \subset\mathcal O_K:N\mathfrak a =n\}$. When $K=\mathbb Q$ this is just the Riemann zeta function. When $K = \mathbb Q(i)$ as in your question, then we will have $a_n = 0$ whenever $n$ cannot be written as a sum of two squares. However, for example, when $(x+yi)$ and $(x-yi)$ are different ideals, we will have $a_{x^2+y^2}\ge2$, so this function is slightly different to your $\zeta_{\mathbb Z[i]}$.
This series converges absolutely in the half-plane $\mathrm{Re}(s)>1$ and has a simple pole at $s=1$.
Now $\mathcal O_K$ may not be a UFD. However, it will always be a Dedekind domain, so it will be the case that every ideal can be uniquely factorised as a product of prime ideals. It follows that we can write $$\zeta_K(s) = \prod_{\mathfrak p\subset\mathcal O_K}(1-N\mathfrak p^{-s})^{-1}$$where the product is over prime ideals, converges absolutely for $\mathrm{Re}(s)>1$ and has a simple pole at $s=1$. Your proof now applies.
Even further generalisation is possible. For example, by considering the Dirichlet characters$$\chi:(\mathbb Z/m\mathbb Z)^\times\to\mathbb C^\times$$and their corresponding L-functions $$L(s,\chi) = \sum_{n=1}^\infty\chi(n)n^{-s}=\prod_p(1-\chi(p)p^{-s})^{-1}$$(and some amount of hard work), one can prove Dirichlet's Theorem on Primes in Arithmetic Progressions: that for any $a$ with $(a,m) = 1$, there are infinitely many primes $p$ with $p\equiv a \pmod m$.
One can go even further, and consider what an analogue of this theorem would be for a general number field. One quickly finds oneself playing with some of the ideas of Class Field Theory. For a good introduction to this approach, see (especially chapter 2 of) Class Field Theory by N. Childress.