I haven’t been depressed, but when I’ve been really sad/low, what I’ve wanted most is someone I trust who’s willing to just sit with me, not feel the need to pry or try to fix or anything. I dunno how true this is for others, but that’s usually what I’m wanting. (Although I’ll never admit it.) Someone who doesn’t find silence uncomfortable.
So many people try to pull stuff out of me that I start to make things up just to please them and then I can’t remember what’s true or not… again, not sure how much this is true in general, but it’s my personal experience.
If you want to help… I wouldn’t go out of my way to do things with them, because we all know when others are doing excess for us, but I would be sure to give him invitations on things that you’re already doing and want, or don’t mind, his company for. Even if he turns them down, I’d make a practice of offering. That way he knows he’s got someone consistently there that he can go to. (Even when I turned things down, I liked knowing someone wanted me for more than just a project to work on. But again, I haven’t been depressed so I can’t fully speak for depression.)
As for the irritability, how I would handle it really depends on the intentions. (But I read everything on intentions, so it’s no different.) If you think he’s using it to keep distance, or to connect to people without them being close, or to keep himself down, etc, then realize the insults are empty words with a different target than making you feel down or bad. If it’s because he’s trying to drag others down with him… I’d be careful, I dunno what to say for sure then. Maybe just gently deflect them. If, for example (I have no idea if this example would work in any way, but still) he says “I hate your shirt” go something like “oh, I’m sorry to hear that… because I like it” ...? Not word for word because it’s rather awkward dialogue, but the gist.
I dunno if any of that’s best, but I know it’s what I would want and what I would do.