Given a map $f : S \to M^4$ from a compact closed not necessarily connected oriented surface to a compact oriented 4-manifold, such that $f\_\*([S])$ is zero in $H\_2(M)$, is there a compact oriented 3-manifold $W$ with boundary $S$ and a map $F : W \to M$ that extends $f$?



0-homologous surface bounds
Yes, there is. This follows from the definition of the (singular oriented) bordism group $\Omega\_2(M)$ and the fact that the natural map $\Omega\_2(M)\to H\_2(M;\mathbb{Z})$ is an isomorphism. In fact the conclusion holds for much more general spaces $M$ (such as CW-complexes).


In more detail, $\Omega\_2(M)$ denotes equivalence classes of continuous maps $f: S\to M$, where $S$ is a closed oriented surface (not necessarily connected), under the relation of *bordism*: two such maps $f\_1: S\_1\to M$ and $f\_2: S\_2\to M$ are declared bordant if there is a $3$-manifold $W$ with boundary $\partial W = S\_1\sqcup S\_2$ and a map $F:W\to M$ extending $f\_1\sqcup f\_2: S\_1\sqcup S\_2\to M$ (everything up to diffeomorphism). This defines an abelian group with addition given by disjoint union. The zero element is represented by any $f:S\to M$ which bounds a map from a $3$-manifold (as in your question).


The natural map $\Omega\_2(M)\to H\_2(M;\mathbb{Z})$ sends $[f:S\to M]$ to $f\_\ast([S])$. The easiest (but perhaps not the most elementary) way to see that this is an isomorphism is to examine the Atiyah-Hirzebruch spectral sequence for bordism (see Conner and Floyd's "Differentiable Periodic Maps", section 7), armed with the additional data that $\Omega\_1 = \Omega\_2 = 0$, i.e all oriented $1$ and $2$-manifolds bound. 


