Regretting sex

So I had sex with my husband tonight bc I’ve been worried abt not meeting his needs and him leaving me or cheating and I really didn’t want to but it was completely consensual I played along with it but it really hurt (I just had our son 3 months ago and I had an IUD put in and I have pcos and endo) I’m not sure what’s wrong with me but I feel like I’m losing it I feel horrible bc I keep getting flashbacks of when I was raped and I flinch when he touches me but it’s not his fault at all and I don’t feel like I can talk to him bc I don’t want him to feel bad. Idk what to do