Wow - so he's been this way for 16 out of the 17 years you've been married??? Has there ever been a time when things were different between you, even if it a long time ago? If so, there is hope there somewhere. Depression can do quite a number on relationships - if that's what's going on for him. You're right, it becomes a cycle of behavior where both people end up feeling unloved. He acts mean and you reject.
If he's truly clinically depressed one would hope that he would see the benefit of getting a hold of if for the sake of you, the family and mostly himself. If he's not interested, I hate to say it but it doesn't look good.
Good luck...