How to recover one's career opportunities after a period of poor performance
You've got a few problems here, so I'm going to try to address each in turn.

Depression: As has been noted before on several occasions, depression is very common among graduate students and faculty.  The important thing to remember is that you're not alone.  Most universities have counseling centers that are available to students for free - take advantage of that.  Psychotherapy is effective for most individuals, and a trained professional can help you come up with strategies that are tailored for you.

Adviser Troubles: It's unfortunate that your adviser seems to be less interested in your progress because of some poor grades early on.  The trick now is how to make your adviser regain interest in you again - whether that's through more frequent meetings with them (out of sight, out of mind, so stay in sight) or by being proactive and finding interesting research directions to pursue is something you'll have to decide.  As a last resort, consider finding a new adviser - it may mean losing several years worth of work, but if it can rekindle the adviser/advisee relationship, it may be worth it.

Letters of Recommendation: One option is to consider alternative sources - are there professors of not-as-relevant courses that you can go to?  Past internship employers?  For networking - are there career centers or fairs at your school that you can leverage? Think outside the box.  Moreover - don't give up on the professors that you've had so far.  Asking for a letter of recommendation, with an acknowledgement that you may not have done as well as you hoped in the course, but you still learned valuable material may yield at least an "okay" letter of recommendation.  And there's always the possibility that their opinions of you are not as poor as you think they might be.

Boredom: This may be the biggest problem of all.  You can see a therapist; you can meet with your adviser weekly; you can cobble together LoRs - but if you're still bored stiff and have zero motivation to do anything, you've got a problem on your hands.  Generally, I've found there are two solutions to boredom:


Power through and do the best you can do.  As Randy Pausch (late Prof. at Carnegie Mellon) said, "The brick walls are there for a reason. The brick walls are not there to keep us out. The brick walls are there to give us a chance to show how badly we want something. Because the brick walls are there to stop the people who don’t want it badly enough. They’re there to stop the other people."  Show that you aren't "the other people".
Find something else to do.  Sometimes there's nothing you can do about it - you're bored, and no amount of self-negotiation will change that.  In those times, you just have to find something else to do.  Here that could mean a new research project, or even just a new angle on the current one.


Which solution is the "correct" one is entirely dependent on you.  



Summary: My overall point is that it's going to be an uphill battle for you.  If you want this degree, you're going to have to prove it, and ultimately only you can decide what's best for you.

Here's a little inspiration to get you through your day:


  Optimist: Someone who figures that taking a step backward
  after taking a step forward is not a disaster, it's a cha-cha. ~Robert Brault


Best of luck!