Aside from the obvious "see a doctor" comments, there's a few things you could do. *warning* This might seem stupid/silly/crazy....
First, to determine if the problem is physical or phycological, you can use the fact that just about all men have erections in their sleep, and issues such as depression generally don't interfere with those. Right before you go to bed, put some tape (not hard packing tape, just the small tape you use to wrap a present) around your member (not too tight!). If you wake up in the morning and the tape has been opened (due to an erection obviously), then you know physically things are working. If the plumbing is not working, go see a urologist immediately -- trouble with erections are often early warning signs for more serious issues like clogged arteries and circulation issues.
Anti-depressants are not going to help the sex drive in the short run, but they could help with the overriding issue, assuming there is one.
If you see a urologist, you can ask him for a sample of viagra/levitra/cialis/whatever to see if that fixes things and brings back confidence.
Good luck!