Having had 2 e39's petrol's that I racked up 150k miles in over nearly a 10 year period (I'm not counting the current 530i because that hasn't covered enormous mileage as its not a daily), I'd say that servicing, repair and consumables (e.g. tyres but not fuel) worked out at about €0.07 per mile. These were cars that were well maintained by prior owners and things kept on top of in my ownership.

If you go the e39 route don't buy an "improver", you'll pour a lot more than €0.07 per mile in to it. Find a sound car with good solid history and provenance and you'll get nearer the €0.07.

Don't be shy about spending a little more to get it and, within reason, don't be put off by a hefty mileage if the car and history stack up. They are very much a car to buy based on condition.