  Stellar activity limits the radial velocity search and characterisation of
exoplanets, as it introduces spurious jitter in the data sets and prevents the
correct retrieval of a planetary signal. This is key for M dwarfs, considering
that they manifest high activity levels and are primary targets for present and
future searches of habitable Earth-like planets. Effective filtering of
activity is crucial to achieve the sensitivity required for small planet
detections. Here, we analyse the impact of selecting different line lists for
least-squares deconvolution on the dispersion in our RV data sets, to identify
the line list that most effectively reduces the jitter. We employ optical
observations of the active M dwarf EV Lac collected with ESPaDOnS and NARVAL,
and study two line selection approaches: a parametric one based on line
properties and a randomised algorithm that samples the line combination space.
We test the latter further to find the line list that singles out the activity
signal from other sources of noise, and on AD Leo and DS Leo to examine its
consistency at mitigating jitter for different activity levels. The analysis is
complemented with planetary injection tests. The parametric selection yields a
RV RMS reduction of less than 10%, while the randomised selection a systematic
>50% improvement, regardless of the activity level of the star examined.
Furthermore, if activity is the dominant source of noise, this approach allows
the construction of lists containing mainly activity-sensitive lines, which
could be used to enhance the rotational modulation of the resulting data sets
and determine the stellar rotation period more robustly. Finally, the output
line lists allow the recovery of a synthetic planet (0.3-0.6 MJup on a 10 d
orbit) in the presence of both moderate (20 m/s semi-amplitude) and high (200
m/s) activity levels, without affecting the planet signal substantially.
