As an all-round use-able car I'm pretty sure the e46 m3 is hands down better.
Th Z3M's came with 2 engine options; 98-00 cars had the e36 m3 engine (s50), later 00-01 cars had the same S54 lump as the e46 m3, albeit with a slightly lower rev limit so they dont make quite the same top end power.
The S50 cars are meant to be 321bhp, but like the 172's this is very rarely seen, mine is a healthy car and made 296 with a power-sapping open cone filter
The S54 cars often make much closer to their claimed 325bhp, with a remap to raise the limiter they can frequently get to exactly the same as the m3 boys'.
The Z's character is however completely different i'm told (having never driven an e46 m3). The Z has fewer gears (only 5), rear suspension from the 1980's e30 3 series, a limited slip diff, and of course less seats and (i think) less weight. To me it feels something like an unhinged american muscle car, it is desperate to go sideways and feels like a real 'brute'.
I'm quite sure an m3 would be faster and easier to drive (slow or quick), whilst obviously being more practical.
For me though, the Z is way more exciting and feels more special, every time I get in it even to go to work it feels like an 'event', it turns so many heads as well, which im not sure an M3 would in quite the same way. Its certainly fast enough day-to-day, I can confirm the claimed 0-60 time of 5.2 seconds is somewhere mighty close to the mark, if you let it rev, the thing just pulls and pulls and pulls!
In short, decide if you need 4 seats, practicality and ton of other owners to draw help from,
or
2 seats and lunacy, but with a way smaller support network and all the downfalls that brings.