Do you do a lot of checking to see if the baby is okay? Consider this might be OCD - any checking makes it likely.
Definitely see your doctor and ask for a referral to a specialist, the GP wont be able to help. Do that, and then...
If its OCD, checking will actually make it worse. As hard as it is, accept the thoughts are thoughts, and get on with your day as much as you can.
I used to suffer badly with OCD, I don't so much now because I have trained myself to not care that much about the things I cant control.