For general risk processes, we introduce and study the expected time-integrated negative part of the process on a fixed time interval. Differentiation theorems are stated and proved. They make it possible to derive the expected value of this risk measure, and to link it with the average total time below 0, studied by Dos Reis, and the probability of ruin. We carry out differentiation of other functionals of one-dimensional and multidimensional risk processes with respect to the initial reserve level. Applications to ruin theory, and to the determination of the optimal allocation of the global initial reserve that minimizes one of these risk measures, illustrate the variety of fields of application and the benefits deriving from an efficient and effective use of such tools.