A method for the construction of Stein-type covariance identities for a nonnegative continuous random variable is proposed, using a probabilistic analogue of the mean value theorem and weighted distributions. A generalized covariance identity is obtained, and applications focused on actuarial and financial science are provided. Some characterization results for gamma and Pareto distributions are also given. Identities for risk measures which have a covariance representation are obtained; these measures are connected with the Bonferroni, De Vergottini, Gini, and Wang indices. Moreover, under some assumptions, an identity for the variance of a function of a random variable is derived, and its performance is discussed with respect to well-known upper and lower bounds.