A new mathematical tool for an exact treatment of the dynamics of open quantum systems