I think you will run into a problem with $f$ being continuous.
In case you have a sequence of linear combinations of Hamel basis which do not have $x_0$ as summand but converge to $x_0$ then the limit of the $f$ values of these linear combinations will be zero and not one.
Addendum:
As an example that a functional constructed using a Hamel Basis for its definition and which is not continuous, let us consider an infinite dimensional Banach space $X$ having a Hamel Basis $\mathbb{H}$. Let us consider the family of projections $\pi_h:X\to\mathbb{R}$ where $h\in \mathbb{H}$. For fixed $h_0$ these are defined for any $x$ which will be represented as unique finite sum $x=\sum_{h\in\mathbb{H}}\alpha_hh$ with appropriate $\alpha_h\in\mathbb{R}$ as $\pi_{h_0}(x)= \alpha_{h_0}$.
Then there is at least one $\pi_{h}$ which is not continous.
You can see that by taking a countable subset of $\mathbb{H}$, say $h_0, h_1,... $ and consider
$$x=\sum_{k=0}^\infty \frac{h_k}{2^k||h_k||}$$
By construction $x$ is not a finite linear combination of the $\{h_k\}$.
So for all $k\in\mathbb{N}$ we have $\pi_{h_k}(x)=0$. On the other hand, if all $\pi_{h_k}$ would be continuous then we would have for all $k\in\mathbb{N}$ : $\pi_{h_k}(x)=\frac{1}{2^k||h_k||} >0$, which is a contradiction. So at least one projection will be discontinuous.