Rocky waters in relationship

Has anyone experienced a change in their relationship but come out ok? I’ve been with my bf for 4 years and love him so much but feel a strain or distance (on my end). Like it doesn’t feel worth it anymore and that I want to give up. I don’t understand where this came from- literally overnight and it breaks my heart. I don’t want to lose him but I also kinda.. don’t care.

I constantly ask him if he’s ok and if he still wants to be with me and he says yes but asks why I keep asking. I think I realized I’m asking him because of my own feelings.

Has anyone felt this way and then it goes away and their relationship is fine again?