If a separately continuous function $f : [0,1]^2 \to \mathbb{R}$ vanishes on a dense set, must it vanish on the whole set? Assume $f(x,y)$ is defined on $D=[0,1]\times[0,1]$, and $f(x,y)$ is continuous of each separate variables(i.e. if we fix $y$ to $y_0$, then $f(x,y_0)$ is continuous and vice versa). If $f(x,y)$ vanishes on a dense subset of $D$. Does $f$ vanishes on $D$?
 A: As mentioned in the other answer, this is proved in a paper by Sierpiński. The main idea of Sierpiński's construction is quite nice, but it took me a while to process it as its written in the original paper. I thought I would offer a different presentation that makes sense to me.
Let our dense set be called $Z$, for "zero". Take some point $a$ of the plane. Of course $a$ is approached by points $a_n$ of $Z$, and we will have $f(a_n)=0$, but without full continuity we cannot conclude that $f(a)=0$. We could do it if the $a_n$ were horizontally or vertically aligned with $a$. And we can't guarantee that: a dense set does not necessarily intersect every horizontal segment. For example, the rational points of the plane fail to intersect plenty of horizontal segments.
So let's try something more subtle. By horizontal continuity, there's a little horizontal segment around $a$ on which $f$ varies by less than $\epsilon$. If I can find a point $b$ on that segment which itself is a limit of vertically aligned points of $Z$, then even though $b$ is not in $Z$, we'll still have $f(b) = 0$ and $|f(a)|<\epsilon$, and if this is true for all $\epsilon$, we're done. Must such a $b$ exist? Surely it must, right? If $Z$ is dense, surely there must exist at least one vertical line intersecting or horizontal segment on which $Z$ is dense. Right?
Well, no. There are dense sets which are dense in no vertical line. In fact, there are dense sets whose intersection with any line contains at most two points.
So we need something even more complicated. Let $h$ be our horizontal segment around $a$ on which $f$ varies by at most $\epsilon$. What we're going to do is find a sequence of vertically aligned points $b_n$ which converge to a point $b\in h$. We will not have $b_n\in Z$, and we won't even have $f(b_n)=0$. What we will have is $|f(b_n)|<\epsilon$. Therefore $|f(b)|<\epsilon$ by vertical continuity, and $|f(a)|<2\epsilon$.
How can we find $b_n$? We'll build a sequence of points $z_n\in Z$ above $h$, and whose $y$-coordinates converge down to $h$. Each point $z_n$ has its own little horizontal segment $h_n$ on which $f$ varies by at most $\epsilon$. We will build our $z_n$ such that these $h_n$ are all over one another, meaning their projections onto the $x$-axis have non-empty intersection. Thus there will be a vertical line intersecting all of them, and the intersections between that line and the $h_n$ will be our $b_n$.
How can we build such a sequence $z_n$? Pick $z_1\in Z$ above $h$, somewhere. Find its horizontal segment $h_1$. Now consider the rectangle $R$ between $h_1$ and $h$, with the same with as $h_1$. We'll pick $z_2$ in there. Since we want the $z_i$ to go down towards $h$, make the height of $z_2$ above $h$ less than $\frac 1 2$. Now, since $z_2$ is below $h_1$, $h_2$ is also at least partly below $h_1$, as required. Truncate $h_2$ so that it doesn't leave $R$, and repeat. Build the rectangle between $h_2$ and $h$, of the same width as the truncated $h_2$. Within that rectangle, find a point $z_3\in R$ whose height above $h$ is at most $\frac 1 3$, and so on. The sequence of points constructed  satisfies all requirements, and we can always continue the construction, since all we need to do at each stage is find a point in $Z$ inside some open rectangle.
A: The answer is yes.  It appears that this was first proved by Sierpiński in 1932.

W. Sierpiński, Sur une propriété de fonctions de deux variables réelles, continues
  par rapport à chacune de variables, Publ. Math. Univ. Belgrade 1 (1932),
  125–128.  http://elib.mi.sanu.ac.rs/files/journals/publ/1/8.pdf

Here's Sierpiński's proof, translated freely into English, and using your notation.
Let $E$ be dense in $[0,1]^2$.  Suppose $f$ is separately continuous and vanishes on $E$.  Let $(x_0, y_0) \in \mathbb{R}^2$ be arbitrary and fix $\epsilon > 0$.  By separate continuity along $y=y_0$, there exists a number $\delta_0$ such that if $|x-x_0|\le \delta_0$ then $|f(x,y_0) - f(x_0, y_0)| < \epsilon$.  Now recursively construct sequences $x_n, y_n, \delta_n$ as follows.  Given $(x_{n-1}, y_{n-1}, \delta_{n-1})$, choose $(x_n, y_n) \in E$ such that $|x_n - x_{n-1}| < \frac{1}{2} \delta_{n-1}$ and $|y_n - y_0| < \frac{1}{n}$; this is possible by the density of $E$.  By separate continuity along $y=y_n$, choose $\delta_n$ such that for all $x$ with $|x-x_n| \le \delta_n$ we have $|f(x,y_n) - f(x_n, y_n)| < \epsilon$.  Without loss of generality, we can also assume $\delta_n < \frac{1}{2} \delta_{n-1}$.  In particular, for any $i \ge k$, $\delta_i \le 2^{-(i-k)} \delta_k$.
Now note that for any $n > k$, we have $$|x_n-x_k| \le \sum_{i=k}^{n-1} |x_{i+1} - x_{i}| \le \sum_{i=k}^\infty \frac{1}{2}\delta_{i} \le \frac{1}{2} \delta_k \sum_{i=k}^\infty 2^{-(i-k)} = \delta_k.$$
In particular, $x_n$ is Cauchy, so it converges to some $\xi \in [0,1]$.  For any $k$ we have $|x_n - x_k| \le \delta_k$ for all $n > k$, so letting $n \to \infty$ we also have $|\xi - x_k| \le \delta_k$.  Therefore $|f(\xi, y_k) - f(x_k, y_k)| < \epsilon$.  But $(x_k, y_k) \in E$ so $f(x_k, y_k) = 0$ and we have $|f(\xi, y_k)| < \epsilon$.  As $k \to \infty$ we have $y_k \to y_0$ so by separate continuity along $x=\xi$ we have $f(\xi, y_k) \to f(\xi, y_0)$.  Thus $|f(\xi, y_0)| \le \epsilon$.  Since $|\xi - x_0| \le \delta_0$, we have $|f(\xi, y_0) - f(x_0, y_0)| < \epsilon$.  So we have $|f(x_0, y_0)| < 2\epsilon$.  Since $\epsilon$ was arbitrary we conclude $f(x_0, y_0) = 0$. 
It looks to me like the proof would go through without change if we replace $[0,1]^2$ with $X \times Y$ where $X,Y$ are metric spaces and at least one of them is complete.    We can also replace the codomain $\mathbb{R}$ by any metric space $Z$.
I don't know what happens if neither $X$ nor $Y$ is complete.  It would also be interesting to ask what happens for more general topological spaces.
A: Here's a modern proof that $f$ must vanish on $D$.
Suppose it does not and assume without loss of generality that $f(0, 0) = 4 \varepsilon > 0$. By horizontal continuity there is $\delta > 0$ such that $f(x, 0) \geqslant 2 \varepsilon$ for $x \in [0, \delta]$. For $y \in (0, 1)$ let
$$F_y = \{ x \in [0, \delta] : (\forall 0 \leqslant z \leqslant y) \, f(x, z) \geqslant \varepsilon \}.$$
Each set $F_y$ is closed as it can be written as the intersection
$$F_y = \bigcap_{0 \leqslant z \leqslant y} \{ x \in [0, \delta] : f(x, z) \geqslant \varepsilon \}$$
of sets which are closed by horizontal continuity of $f$. Moreover
$$[0, \delta] = \bigcup_{y \in (0, 1)} F_y = \bigcup_{n=1}^{\infty} F_{\frac{1}{n}}$$
by vertical continuity of $f$, so by the Baire category theorem some $F_{\frac{1}{n}}$ has non-empty interior, i.e. $(a, b) \subseteq F_{\frac{1}{n}}$ for some $0 \leqslant a < b \leqslant \delta$. But this means $f(x, y) \geqslant \varepsilon$ for all $\left< x, y \right> \in (a, b) \times \left( 0, \frac{1}{n} \right)$, which contradicts the fact that $f$ vanishes on a dense set.
