  Multi-object spectroscopic galaxy surveys typically make use of photometric
and colour criteria to select targets. Conversely, the Euclid NISP slitless
spectrograph will record spectra for every source over its field of view.
Slitless spectroscopy has the advantage of avoiding defining a priori a galaxy
sample, but at the price of making the selection function harder to quantify.
The Euclid Wide Survey aims at building robust statistical samples of
emission-line galaxies with fluxes in the Halpha-NII complex brighter than
2e-16 erg/s/cm^2 and within 0.9<z<1.8. At faint fluxes, we expect significant
contamination by wrongly measured redshifts, either due to emission-line
misidentification or noise fluctuations, with the consequence of reducing the
purity of the final samples. This can be significantly improved by exploiting
Euclid photometric information to identify emission-line galaxies over the
redshifts of interest. To this goal, we compare and quantify the performance of
six machine-learning classification algorithms. We consider the case when only
Euclid photometric and morphological measurements are used and when these are
supplemented by ground-based photometric data. We train and test the
classifiers on two mock galaxy samples, the EL-COSMOS and Euclid Flagship2
catalogues. Dense neural networks and support vector classifiers obtain the
best performance, with comparable results in terms of the adopted metrics. When
training on Euclid photometry alone, these can remove 87% of the sources that
are fainter than the nominal flux limit or lie outside the range 0.9<z<1.8, a
figure that increases to 97% when ground-based photometry is included. These
results show how by using the photometric information available to Euclid it
will be possible to efficiently identify and discard spurious interlopers,
allowing us to build robust spectroscopic samples for cosmological
investigations.
