SELECT username FROM ingame_users (idk how your table is called and i don't want to know) WHERE email="{insert my email here}";
And send the result to that email.
Is it too insecure?
Just a suggestion.
You could also, send a confirmation mail when someone registers with the username,
or send the username on the email when a password reset is required.