Grieving over a bad dream annuls the dream so that it is not fulfilled.
Sefer HaMidos, Depression, Part I §30