Due to their physical properties, nanomechanical sensors (NEMS) can achieve mass measurements in the mega- to gigadalton range, which is hardly obtained with conventional mass-spectrometers. However, NEMS signals are subject to noise, causing a loss of mass resolution and thus emphasizing the need of noise control. We propose a denoising model that relies on a total variation formulation, which deals with different noise models (particularly colored noise) affecting NEMS. The model also takes into account the physics of NEMS, such as the non-linear coupling between signals of individual NEMS. The performance of the proposed model is tested on simulated data which parameters are chosen similar to true experimental conditions. The obtained results confirm the interest of our model with a mass-resolution increase over 20% compared to methods used in literature.