If you can get previous gen M5's for £20K, i'd have thought there were BMW535d's for simular money?
The previous M5 was great (unlike the new one), so I think you should definitely go for it! I drove a saloon version at launch in Germany on the Autobahn and more recently drove an estate version of it. They were excellent - the screaming NA V10 engine in particular! And if you buy one, at least you can say you've owned a V10 super saloon instead of a diesel 5-Series! We won't see another car like the previous M5 again because of the EU's stupid emissions regulations. Also, you can buy a boring diesel 5-Series whenever you feel like it. Go for it! Without trying to offend Hindus, you only live once.
A friend of mine recently purchased a 4doors M3, magnficient car. The added practicality over the coupè is evident and the car looks like an ordinary 3series in a positive way, I'd go for one of them instead of the M5 now. The E60 M5 is great, I still remember it as a memorable drive but I'd be scared by something going wrong and it doesn't look so fresh to my eyes now. If I have to go for one I would choose a fresh example on sale in a BMW dealer, covered by a factory warranty. Spending £5k more doesn't really make much difference and can give you a bit more serenity.