$f$ has a holomorphic extension to a neighborhood of $\mathbb{R}$, so the answer is yes by the unicity theorem.