Musically, I'm inspired by the artist's whose music I consideration exceptional/transformative, and I cross-reference the music to what is being delivered emotionally and conceptually to the lyrics. But rarely do I try to imitate subject matters or themes. They are and always will be different people than me, who have lived vastly different lives.
Far often than not, If I write a tune the inspiration for the music itself comes from conceptuals riffs, (does the riff suggest despair, drama, intensity, felicity etc.) and I'll work from there and my lyrics will be non-existent or minimal. Sometimes I'll work from a title, that comes to mind, and see what kind of story the title alone can tell and obviously add to it. I've had the least fun writing lyrics that I need to find music for but it has happened. But I love nothing more than to tell a kind of short story, and if the gist of the story is in my head the lyrics seem to come most easily. One of my more favorite songs that I like lyrically is a sort of dystopian or rather historical retelling based on a famous speech by Otto von Bismarck. The story was there, it did take place, but its reality and potential implications I took liberty with.
Unfortunately, I haven't had as many fruitful or bad relationships to base a story on just a lot of pining...but if you can learn anything from pop music, love and relationships are a hell of a bag to pull from.