I think BMW M and Mercedes AMG are targeting their cars to different types of car enthusiasts.
BMW has always been about "the ultimate driving experience", and their M cars are their top of the line products. BMW and M always have and continue to produce cars which reward drivers with excellent steering feel, excellent brake feel, and manual transmissions (stick or SMG) which give the driver complete control. Cars like the E46 M3 and E60 M5 have wonderful high reving naturally aspirated powerplants which generate power with high engine speeds, again requiring the driver to "work" a bit to get the speed and acceleration. The ride in M cars is a bit harsh, but that rougher ride on everyday roads means excellent cornering ability and grip on a track with curves. As a "fun" car on a track that demands more driver involvement, BMW M is the clear winner. It is no fluke that almost every car magazine/show consistently rate BMW M cars very highly when it comes to overall performance.
I think AMG customers are a different breed. AMG cars are usually more luxurious inside and more heavy than M cars. All AMG cars have automatic transmissions (with manual modes if you want to shift like a sequential gearbox) which mean a smoother, more relaxing driving experience on everyday roads. All AMG cars use large displacement engines (with or without forced induction) to generate gobs of torque in the low-mid rpm range. As such, it is easier and more relaxing to drive an AMG car fast, as you don't have to rev the engine as high. Most AMG cars have a more comfortable ride on everyday roads than the M cars. The cost for that everyday comfort is more body roll when cornering at the limits, compared to a M car. However, it is all relative. All AMG cars have more sporty tuned suspension which make them handle much better than normal Benzes and most "sports cars" on the road. Bottom line: almost every AMG car is easier and more relaxing to drive fast on everyday roads (straight or twisty) compared to the equivalent M car, but the M cars offer a greater sense of involvement. On a track where you are cornering at the limits of grip, the M cars inspire more confidence for the driver. On the other hand, it's hard to beat the AMG experience if you're cruising or rocketing down the highway.
To me, the Audi S/RS line of cars is harder to label. They seem to offer a hybrid between the M and AMG experience, although I think they are aiming to be more like BMW M, but with quattro AWD as their distingishing feature.