My husband resents me for having our daughter

My husband and I have been married almost 5 years and just recently had our first baby. Last few weeks I noticed him trying to find ways not to be at home like going to the gym, going to hang out with his friends or going golfing. Just anything to be away from the house. Last night while we are going to bed he said that he “resents me and hates our daughter”. That he has no emotional connection to her. He never thought he would ever be a dad and never wanted kids. To be honest I wasn’t sad or upset that he told me this. I’ve been noticing his reaction to our daughter becoming more and more distant and he always said (while I was pregnant) that he wasn’t going to be a good father. Not to mention he’s been battling over depression for years now. And I’m guessing the constant crying and fussy ness was starting wear him down. I need him sometimes. Raising a baby is ridiculously hard and exhausting. I just don’t know where to go from here...I still love him and I honestly think that when she’s older and not constantly on the tit he will grow to love her more. But for now, where that leave us? Should I leave, since he’s not happy? Or wait it out and just pray it will get better? Has anyone else had this issue before?