Consider differentiable functions $g(s):\mathbb{R}\to\mathbb{R}_+$ and $h_\nu(x,s):\mathbb{R}^2\to\mathbb{R}$, for each $\nu\in\mathbb{N}$, and define
$$f(x,s)=\sum_{\nu=0}^{\lfloor g(s) \rfloor+1} h_\nu(x,s).$$
Obviously this function is not continuous everywhere but I am curious to know if, where it is continuous, it is also differentiable and what this derivative with respect to $s$ looks like. This is similar to the MSE post here but different in that the summand is also a function of $s$. I have tried setting up an analogous use of the Euler–Maclaurin Formula but I'm getting nowhere.
Any resources would be much appreciated.