  The stellar activity of M dwarfs is the main limitation for discovering and
characterizing exoplanets orbiting them since it induces quasi-periodic RV
variations. We aim to characterize the magnetic field and stellar activity of
the early, moderately active, M dwarf Gl205 in the optical and nIR domains. We
obtained high-precision quasi-simultaneous spectra in the optical and nIR with
the SOPHIE spectrograph and SPIRou spectropolarimeter between 2019 and 2022. We
computed the RVs from both instruments and the SPIRou Stokes V profiles. We
used ZDI to map the large-scale magnetic field over the time span of the
observations. We studied the temporal behavior of optical and nIR RVs and
activity indicators with the Lomb-Scargle periodogram and a quasi-periodic GP
regression. In the nIR, we studied the equivalent width of Al I, Ti I, K I, Fe
I, and He I. We modeled the activity-induced RV jitter using a
multi-dimensional GP regression with activity indicators as ancillary time
series. The optical and nIR RVs have similar scatter but nIR shows a more
complex temporal evolution. We observe an evolution of the magnetic field
topology from a poloidal dipolar field in 2019 to a dominantly toroidal field
in 2022. We measured a stellar rotation period of Prot=34.4$\pm$0.5 d in the
longitudinal magnetic field. Using ZDI we measure the amount of latitudinal
differential rotation (DR) shearing the stellar surface yielding rotation
periods of Peq=32.0$\pm$1.8 d at the stellar equator and Ppol=45.5$\pm$0.3 d at
the poles. We observed inconsistencies in the activity indicators'
periodicities that could be explained by these DR values. The multi-dimensional
GP modeling yields an RMS of the RV residuals down to the noise level of 3 m/s
for both instruments, using as ancillary time series H$\alpha$ and the BIS in
the optical, and the FWHM in the nIR.
