How to smoothen signal with missing values before differentiation?
The best tool for this job is normalized convolution. It can deal with missing samples as well as uncertainty.

The paper describing the method is "Normalized and Differential Convolution -- Methods for Interpolation and Filtering of Incomplete and Uncertain Data" by Hans Knutsson Carl-Fredrik Westin. There is a PDF on Semantic Scholar. 

Normalized convolution basically takes a convolution with a Gaussian of the data, with 0 for the missing samples, and divides sample-wise with the result of the same convolution on a weight signal, which is 1 for known samples and 0 for the samples you set to zero. More formally:

$$
g = (( f m ) * h ) / (m * h)
$$

(With $h$ the convolution kernel and $m$ the weight signal). You can derive the analytic derivative of that equation, leading to a derivative operator that is robust to missing samples. See the paper for more details.