Sex after baby

My son is just about 4 months old. I had an extremely difficult birth (almost died) and I have ZERO interest in sex, or being touched, or cuddle, or kissing, pretty much anything intimate, but my partner keeps trying and I'm getting annoyed but I also feel very guilty because he's been so attentive and understanding about everything. I'm having a really hard time being in a relationship and being a mom.

I also keep having dreams about an ex and I find myself missing him and thinking back like damn why didn't I try harder or do things differently so the situation I'm in would be with him. Has this happened to anyone else. Is it just nostalgia?