At the time of import in Lightroom you need to set a destination to copy the images, when importing it from the SD Card.
What I think you kept you images on the SD Card and added the previews in Lightroom and after removing the SD Card Lightroom don't detect the original files.
Please refer the link for more guidance: How to transfer photos from a camera or card reader to Photoshop Lightroom
Hope it helps.
Thanks Mohit - you're probably right, although I don't know why this happened suddenly since I've imported thousands of photos the same way before. I'll pay closer attention to the import settings next time.
Note to anyone else in the same situation; I was able to recover the lost images from the formatted SD card using PhotoRec (free, open source). Found every single file.