How do you fight depression?

I noticed that I maybe depressed for a while and I’m unsure how to deal with it. I am fine when I’m with people and SO, but once I’m alone I seem to feel like drowning. Definitely, seems to not be motivated and have a hard time just getting through.