Generalized Mehler semigroups and applications