The iTunes login window does not provide a way to retrieve a forgotten ID.
At the very least, if the songs are DRM protected and you have not allowed your system to play them, iTunes will display a notification to log in to your account before it plays those songs.
In this window, you must first enter Apple ID and password (Apple only provides a quick recovery link if you forget your password and does not provide a way to recover if you forget your iTunes account ID). However, there is an easy way to find this ID using the items you have purchased.
iTunes ID will be in the blue box, when you get information about the song or movie you bought earlier.
Since each song, movie purchased on iTunes will be attached to the name, account you use to buy, so you can use them to find your lost account username.
To view this information, simply select any song or movie> press Command-I (or select "Get Info" from the File menu)> you will see the name and Apple ID listed in the Summary tab of the window appears (default tab). You can now use this Apple ID as the username , and then retrieve the password if necessary.