Generalization of Kramers formula for open quantum systems