In the HJM model one considers the forward rates to be on the form
$$\mathrm df(t,T) = \alpha(t,T)\,\mathrm dt + \sigma(t,T)\,\mathrm dW(t)$$
In the proof of showing the drift condition on $\alpha$ in this model, one has to in one stage, find the dynamics of a process $Y(t,T)$ which has the following representation
$$Y(t,T) = - \int_t^T f(t,u)\,\mathrm du,$$ i.e. one wants to compute the dynamics of $\mathrm dY(t,T) = -\mathrm d\Big(\int_t^T f(t,u)\,\mathrm du\Big)$, and the result is $$\mathrm dY(t,T) = f(t,t)\,\mathrm dt - \int_t^T \mathrm df(t,u)\,\mathrm dt$$
To me it sort of makes sense that the terms will end up there (given the rules of differentiation of the integrals etc), but how would one rigorously show that this is indeed the correct representation or explain the reasoning behind it.