Is such a multivariate function the product of two univariate functions? 
Let $f: \mathbb{N}^2 \rightarrow \mathbb{R}$ be a function of two variables, $f=f(x,y)$. $f$ has the following property:
$$
\sum_{y\in A} f(x,y) = 0
$$
where sum on $y$ runs over a fixed finite $A$, independent of $x$. 

Can we necessarily conclude that $f(x,y) = g(x) h(y)$? $g(x)$ and $h(y)$ are two other functions. Is there any other property that $f(x,y)$ should meet?
 A: If $f=gh$ holds for suitable functions $g$ and $h$, then for $x_1,x_2,y_1,y_2\in\mathbb N$ the matrix
$$ C(f,x,y) := \begin{bmatrix} f(x_1, y_1) & f(x_1, y_2) \\ f(x_2, y_1) & f(x_2, y_2) \end{bmatrix} = \begin{bmatrix} g(x_1) \\ g(x_2) \end{bmatrix}\begin{bmatrix} h(y_1) & h(y_2) \end{bmatrix} $$
has rank $1$ at most.
Define $g_1,g_2:\mathbb R\to\mathbb R$ by $g_k(x) = x^k$.
Define $h_1, h_2:\mathbb N \to \mathbb R$ by
$$ h_k(y) = \begin{cases} 1 & y = k \\ -1 & y = k+1 \\ 0 & \text{else}. \end{cases} $$
Then, the function
$$ f(x,y) = \sum_{k=1}^2 g_k(x) h_k(y) $$
is well defined and satisfies
$$ \sum_{y=1}^\infty f(x,y) =  \sum_{y=1}^3 \sum_{k=1}^2 g_k(x) h_k(y) = \sum_{k=1}^2 \left( g_k(x) \sum_{y=1}^3 h_k(y) \right) = 0. $$
However, the matrix
$$ C(f, (1,2), (1,2)) =  \begin{bmatrix} 1 & 0 \\ 2 & 2 \end{bmatrix} $$
has rank $2$.
Thus, there exists no $g,h:\mathbb N\to\mathbb N$ with $f=gh$.
A: Did you try something like this?  $f(x,x)=1, f(x,x+1)=-1$, others ${} = 0$.
A: A simple example shows that we cannot hope for $f(x,y) = g(x) h(y)$ merely because a condition:
$$ \sum_{y\in A} f(x,y) \equiv 0 $$
holds for a finite set $A$.
Indeed we can restrict $f(x,y)$ to a polynomial map on $\mathbb{R}$ with integer coefficients.  If every monomial term of $f$ has a factor of $y$, then the condition above holds for $A = \{0\}$, but many such polynomials cannot be factored into separate functions of $x$ and $y$.
For example, $f(x,y) = (x+y)y$ is not of the form $g(x) h(y)$.  To sketch a proof, consider that $f(x,y)$ is not univariate, so neither $g(x)$ nor $h(y)$ can be constant.  But since $f(1,y) = y + y^2 = g(1) h(y)$ and $f(0,y) = y^2 = g(0) h(y)$, it must be that $(g(1) - g(0)) h(y) = y$, so:
$$ h(y) = (g(1) - g(0))^{-1} y $$
With this result we should have $f(x,y)/h(y)$ a function depending only on $x$, but:
$$ f(x,y)/h(y) = (x + y)(g(1) - g(0)) $$
is not a function of $x$ only even if we restricted ourselves to natural number arguments for $x,y$.
Indeed the condition imposed here is homogeneous, so that if $F_1(x,y)$ and $F_2(x,y)$ satisfy it, so will any linear combination $\alpha F_1 + \beta F_2$.  This suggests the best result that could be hoped for is existence of a basis of functions of $g_i(x) h_i(y)$.  In the restricted case of bivariate polynomials this conclusion is of course trivial.
