Signal filtering/smoothing is a challenging problem arising in many applications ranging from image, speech, radar and biological signal processing. In this paper, we present a general framework to signal smoothing. The key idea is to use a suitable linear (time-variant or time-invariant) differential equation model in the regularization of an optimization problem. The presented approach has many applications in signal processing. Specifically, the quadratic variation (QV) regularization and smoothness priors are special cases of the proposed framework. These two methods are particularly suited for polynomial signal smoothing, as they use the derivatives of the signal in the regularization term of the optimization problem. Therefore, their performance is significantly decreased for signals that cannot be well modeled with a low order polynomial function. The approach presented in this paper was used to overcome this limitation. As proof of other applications, it was employed for designing an extension of QV regularization to remove the baseline wander in electrocardiogram (ECG), simultaneous tracking of powerline interference and baseline wander, and T-wave amplitude computation.