The Fueter theorem provides a two step procedure to build an axially monogenic function, i.e. a null-solution of the Cauchy-Riemann operator in
R
4
\mathbb {R}^4
, denoted by
D
\mathcal {D}
. In the first step a holomorphic function is extended to a slice hyperholomorphic function, by means of the so-called slice operator. In the second step a monogenic function is built by applying the Laplace operator
Δ
\Delta
in four real variables to the slice hyperholomorphic function. In this paper we use the factorization of the Laplace operator, i.e.
Δ
=
D
¯
D
\Delta = \mathcal {\overline {D}} \mathcal {D}
to split the previous procedure. From this splitting we get a class of functions that lies between the set of slice hyperholomorphic functions and the set of axially monogenic functions: the set of axially polyanalytic functions of order 2, i.e. null-solutions of
D
2
\mathcal {D}^2
. We show an integral representation formula for this kind of functions. The formula obtained is fundamental to define the associated functional calculus on the
S
S
-spectrum.