Suppose $f:D_1\mapsto \mathbb{C}$ and $g:D_2\mapsto \mathbb{C}$, where $D_1, D_2$ are domains in the usual complex analysis sense, are two holomorphic functions such that the following identity holds for all $n\in\mathbb{N}$: $$f\left(\frac{1}{n}\right) = g(n).$$ (Of course $\{1, 1/2, \cdots\} \subset D_1$ and $\mathbb{N}\subset D_2$).
We want to prove using the Identity Theorem that $f=h$ holds everywhere on some domain $D'$, where $h(z)=g(1/z)$ on said domain.
My attempt: For all $z\in\{1,1/2,1/3,\cdots\}$ we can write $f(z) = g(1/z)$. Let $h(z) = g(1/z)$. In order to conclude via the Identity Theorem that $f=h$, we need to restrict both $f$ and $h$ to a common domain, say $D'$, such that both $f(z)$ and $g(1/z)$ are defined and the point $0$ (limit point of the set) is in the domain. But if we take $$D'=\left\{z\;|\:z\in D_1 \cap \frac{1}{z}\in D_2\right\},$$ then surely $z=0$ can't be in $D'$ which leads me to believe that we can't conclude by the identity theorem that $f=h$ no matter what $g$ is. But if $g(n)=0$, then it's easy to see that $f(z)=0$ if $f, g$ have a domain of e.g. $\mathbb{C}$. Where am I going wrong in my thought process?