I have dealt with severe clinical depression for almost half my life. I have had a handful of anxiety attacks, and suicidal thoughts are often regular. I've got a lot of advice, so I'll try to keep it short. Some of what I say might've been said already, but just to reiterate..
You can't dwell on your condition, it will eat you alive. It's natural to think "why me?" but I have found this kind of thinking to be very detrimental. The best thing you can do is find what causes these feelings, and address them. Find things that make you feel better, it will take awhile but once you have a handful or two of things it is easier to deal with.
Physical exercise helps, I lift weights but that isn't everyone's cup of tea. Calisthenics, running, biking etc. It helps.
Goals. It's important to have something to work towards, be it a better job, a hobby, whatever. It gives you a sense of pride when you meet them.
Sleep. I have found the later it gets, the worse my condition gets. So even though I get home at 7:15pm, I'm asleep by 10. Even though it can be hard, just getting enough sleep helps.
Lastly, keep in contact with friends and family. You'll want to shut yourself in, but that's a trap. Get out and talk to people, have friends over, you'll feel better.
When you are overwhelmed just remind yourself to breathe, and take it one step at a time