My girlfriend will on occasion have depressive episodes. Work stuff, money stuff, family/friend stuff, etc. She is hugely independent and wants to solve problems on her own, which I appreciate, but sometimes it is difficult for me to handle. I say this because when this happens, she essentially shuts me out and reverts to escapism when not doing other obligations. When this goes on for a few weeks at a time, it really scares me. 

It's difficult for me, because for 3 weeks there was almost no communication, we hung out maybe twice and she would just shut herself in. I understand we all handle these difficult times differently, and I recognize this isn't a "me" issue but it does affect me strongly. When this happens I miss her, I feel helpless because she doesn't want my support, and it breaks my heart to imagine her isolating herself, wondering if she's eating and whatnot. 

So I have a few questions:

How can I support her the best during these times where she insists on self-isolating?

How can I resolve that my girlfriend essentially avoids and ignores me during these times to focus on herself? What do I do to avoid laying awake at night wondering if she's okay and when she's going to come back to the relationship table? 

For the record I'm coming from a position of "how do I support her and set our relationship up for success" and not "girlfriend doesn't pay attention to me, how do I change that"