I am purely speaking from experience, but I believe it is possible you might have locked her inside a jail cell. If it's been a month, and I doubt you'd remember where, it's going to be a rigorous personal quest for you to go and find that faithful housecarl, who would have followed you to the ends of Nirn. Go, go and find her. You must undertake this task for the sake of your own honor, but for the most part, for Lydia. Even if she might have met a different fate, and, in fact, had not been accidentally incarcerated. Even if she might never be found. At least then, when you depart from this world, you would be able to tell the gods that your heart is heavy from loss, but it is not heavy from guilt--because you know that you have done everything in your power to find and save Lydia, your loyal housecarl and undaunted friend.