No, seriously, try them out in store. You'll go in circles in days and then choose one to only end up with something you don't like the ergonomics of or the feel of the mouse or the material or basically anything else besides the technical specifications of it. The MX518 has the better sensor than the G500 so, between those two, I'd say that one. But it's really hard to just "hey, get this mouse, it's obviously the best" since there's a lot of factors.
Also, it's not like the G500 has a terrible sensor. It has some issues (positive acceleration, high LOD) but the latter is irrelevant if you never lift the mouse and the former is only an issue if you're sweeping left-to-right really fast. At least, that's my understanding of the sensor issues. I just bought a new mouse that should be here in a few days (Mionix NAOS 5000) that has the same sensor so I can get more hands-on for those two problems in a few days.
As for the G400, it's not out yet I thought? It got pushed back to ~August time frame. I'm probably going to pick one up then to see how it fares since it's meant to be a better MX518 and the MX518 is, in all honesty, a really good mouse. Prediction be damned.
Edit: Quick Google gets me
this on the release date. Though, read some people have theirs shipping already so maybe not?