I have seen this first hand in loved ones and also experienced it occasionally myself, though thankfully less frequently. I am extremely adept at compartmentalizing, including work and life... but a deep depression knows no limits easily bleeds over into everything. The mental noise is deafening. I was shocked how strong the effect was during a recent episode of depression, despite my typically strong executive functioning skills.
Equally amazing is the 'blue skies' and 'quiet mind' that can be achieved with proper treatment, for which I am infinitely grateful.
Please seek out help if you are struggling.