If you are looking at spending $50k, I would get a newer E90 M3. The gas prices will have you in pain with the V10 M5 (although the M3 won't be that great either
). Also, to some people its not a big deal at all, but you will obviously have the older body style (albeit 2010 is still rather new). As Icrain said above, the M5 has dropped significantly in price (V10 gas mileage, older style now, etc.), so from a financial aspect, it might not be the best choice.
At least with the M3 you are getting the last NA M car and a car proven to be reliable despite being a beast.
With all of that said, every time I see an e60 M5 I fantasize about trading my M3 for one, but then I remember how sexy the e9x M3 is.