An H-theorem for a class of Markov processes