Those are VERY different headsets, the logitechs are surround headphones so they will be good for gaming in terms of letting you know he direction and distane of sounds. However every surround headset I have ever heard sounds pretty terrible for music and such, they sound anemic to me.
The M40x's are closed back, so they wont have very good sound stage which means they wont be that great for judging direction and distance of sound in games. However they are very good for things like music. They also don't have a mic obviously, something like a mod mic would be a good idea with the m40x's.
I might go for something like sennheiser HD558's, they are open back so they should be quite good for gaming. And they are also excellent for...