Hey buddy, that sort of thing happens to us all at times. First up, try to not worry about it — that’ll only make it worse. As for night-time woodies, sometimes they occur and we’re not aware of them — we don’t always wake up. The problem might just pass. One way to check this out is to tape a piece of paper around your dick before you go to bed. It’ll tear if you get an erection, but should stay in-tact if not.
If it does not pass, though, say after a week or so, I’d go to the doctor and ask him to check you out. Please don’t worry about this sort of physical either — again, we all have to do it at times, especially as we get older. Lots of things can cause ED, three very common things are diabetes (are you overweight), stress (you say you’ve got depression), and low testosterone levels.
Whatever you do, please keep talking about it here. Lots of us have had similar problems over the years and would be happy to share with you where we’ve been and what we did about it. And, please remember, ED hits nearly all of us for a day, week or even month at times — it’s not the end of the world and can be resolved.