For topological spaces $X,Y,Z$ а function $f:X\times Y\to Z$ is called separately continuous if for any $(x,y)\in X\times Y$ the restrictions of $f$ to the sets $\{x\}\times Y$ and $X\times \{y\}$ are continuous.
It is well-known that for any zero-dimensional compact metrizable space $X$ the subset of injective functions is dense in the Banach space $C(X)$ of all continuous real-valued functions on $X$, endowed with the sup-norm $\|f\|=\sup_{x\in X}|f(x)|$. Is a similar approximation result true for separately continuous functions?
Problem: Let $f:X\times Y\to \mathbb R$ be a (bounded) separately continuous function defined on the product of two zero-dimensional compact metrizable spaces $X,Y$. Is there a separately continuous function $g:X\times Y\to\mathbb R$ such that the image $g(X\times Y)$ is countable (finite) and $\|f-g\|<1$?
In this problem we can assume (without loss of generality) that $X=Y$ is the Cantor cube $\{0,1\}^\omega$.
It should be mentioned that for functions of the first Baire class a similar problem has an affirmative answer, see the proof of Lebesgure-Hausdorff-Banach Theorem 24.10 in Kechris' book "The classical Descriptive Set Theory":
Theorem: For a bounded function $f:X\to\mathbb R$ of the first Baire class on a separable metrizable space $X$ there exists a function $g:X\to \mathbb R$ of the first Baire class such that $g(X)$ is finite and $\|f-g\|<1$.