After having depression for 6 years (I'm 24) and struggling against suicidal thoughts, I've found that working out, in combination with the right meds, gives me the fighting chance I was looking for to finally see a way of beating depression. Here's some things I learned along the way that will hopefully help someone in their own battle with depression:
1. If you feel truly lost and don't have hope, you need to get on the right medications or combination of meds. It doesn't have to be perfect, just enough to get you through your day. To have the willpower to even start working out, you need to have a stable mood, and only meds and meditation (just thinking through things) can do this (in my experience).
2. Get proper sleep. I take Trazadone (highly recommend) to help with this, as I've found Ambien and others don't really do anything other than mess with my vision.
3. Once 1 and 2 are at a satisfactory level (perfection isn't going to happen), you'll have a good chance of following through with working out.
4. Prevention and routine is the name of the game. At first, establishing a workout routine is going to be very hard, but it gets much easier after the first week or two. The internet has a ton of resources for beginners and they're easy to find so you can plan your own routine.
5. If you're like me and are very reward-incentivized, give yourself rewards for successfully completing workouts. You'll actually feel better about indulging in whatever you enjoy doing if you construct that as a reward for working out. I.e., I love gaming and extra sleep, so I reward myself in that way.
6. Get a pet or volunteer at a humane society. Pets don't offer the same kind of acceptance that people do, but that's usually a good thing.
Really, success in working out is more about creating the environment in which to succeed rather than having a gratuitous amount of willpower.
What helped me initiate actually doing the reps and workout itself was my realization that people around me are pretty much full of shit and have enough problems of their own that I can't really expect them to constructively help other people, much less myself.
It's painful to think that people who should care about you aren't really that interested in helping you, but that's just reality. I asked for help many times, but in the end, it was a failed suicide attempt that taught me that the only person who can and wants to help me is, well, myself.
Not that anyone should pity me, and I don't want them to, I just hope some of these thoughts, while pretty basic, allow people to find a way out of depression without having to get to rock-bottom.