Low-mass stars have been recognised as promising targets in the search for rocky, small planets with the potential of supporting life. As a consequence, Doppler search programmes using high-resolution spectrographs like HARPS or HARPS-N are providing huge quantities of optical spectra of M dwarfs. We aim to calibrate empirical relationships to determine accurate stellar parameters for early M dwarfs (spectral types M0-M4.5) using the same spectra that are used for the radial velocity determinations. Our methodology consists in the use of ratios of pseudo equivalent widths of spectral features. Stars with effective temperatures obtained from interferometric estimates of their radii are used as calibrators. Empirical calibrations for the spectral type are also provided. Combinations of features and ratios of features are used to derive calibrations for the stellar metallicity.