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?
I don't think what you have at the moment allows you to conclude what you want. The problem is that with such arbitrary domains and no limit-like conditions on $f$ and $g$, there is no reason that $f$ and $g$ need to agree on a set with an accumulation point, and hence the identity theorem can't be applied, even with that condition you have on $f$ and $g$.
As a counter-example, let $f: \mathbb{C} \to \mathbb{C}$ be the constant function $z \mapsto 1$ and $g: \mathbb{C} \to \mathbb{C}$ be $z \mapsto \exp(2\pi i z)$. Then $f$ and $g$ are entire and for all $n \in \mathbb{N}$,
$$f\left(\frac{1}{n}\right) = 1 = \exp(2\pi i n) = g(n).$$
But there is no open subset of $\mathbb{C} \setminus \{0\}$ for which $g(1/z)$ is constant with value $1$.