It'll be tough to get all that you want in, especially considering your time available, and that you want both extreme west, and eastern. Ideally, you should be the trip up, and force yourself to travel again to see more, because there will always be more.
However, it can be done, depending on what you want to see and do, what your traveling style is, who you're traveling with, money, when you go, etc. etc.
You already started though. Arrival and departure is usually key (but if your flight isn't set in stone, you may want to rethink it).
From here, you should really just look into what is most appealing to you, and try to work it in (but undoubtedly not everything can be done). Grab and look at some guidebooks (Rick Steves' guides are great because they are generally more selective, which can be helpful when in doubt). Then, try to look into ways to link it together. This is where you'll probably realize what you can do, and what will have to wait.
As for getting around, a rail pass may or may not be a good idea. You want to cover a lot of land with only a month, so to be more efficient with time, you could look into flying to link up longer sections (EasyJet, other discount airlines), and use trains on smaller legs. Just thinking out loud, a rough idea would be to start in Frankfurt to Berlin, then go into the Czeck Republic, then fly to Spain (either non-stop or one stop, probably in N. Italy). Explore the peninsula, then fly over to Northern Italy, where you could hop down to Rome, then over to Greece (either fly or the more time consuming boat & train) before heading back to Frankfurt.
It would be a bit rushed, and more of a "sample" of each country, giving you limited time to maybe enjoy a couple of cities/regions lightly in each country. I don't want to sound like a broken record, but you should probably just concentrate on a few countries, that way you aren't spending as much time traveling, and your first trip to Europe will be more rewarding!