$G := \Bbb C \setminus (-\infty, 0]$ can be mapped conformally onto the unit disk. That is generally true for all _simply-connected_ domains due to the Riemann mapping theorem. In this particular case the mapping can be described explicitly as $$ \varphi(z) = \frac{\sqrt z - 1}{\sqrt z + 1} $$ where $\sqrt z$ is the holomorphic branch mapping $G$ onto the right halfplane.
Then $g := \varphi \circ f$ is holomorphic in $D\setminus \\{0\\}$ with values in the unit disk, i.e. $g$ is _bounded_. It follows that $g$ has a removable singularity at $z= 0$, and then the same holds for $f$.
One could also use the "Great Picard Theorem" which states that a holomorphic function takes on all possible complex values, with at most a single exception, infinitely often in a punctured neighbourhood of an essential singularity. But that is an "advanced" result in complex analysis.