Both handle well. As far as tracking and suspension the e36 (in my opinion) is a better car. Primarily because it weighs less and still maintains the majority of the same technology. Are you looking into the M3 versions? The e46 M3 I wouldnt have a doubt couldout handle the e36 M3. But there are mods to change that....
Oh yeah
e36 3 series
1992-1998
e36 M3
1995-1999
e46 3 series
1999-present
e46 M3
2001-present
If you are looking into modifying the engine your best years would be 1995. 1995 was the last year of the OBDI engine managment system which was much easier to modify. Sinc eyou are going to track the car I would stay away from 1992-1994 as they didnt have a reinforcement plate in th erear subframa which allows many cars that are abused on tracks to crack their rear subframe. Problem was fixed in 1995. Anything 1996+ would be harder to mod the engine slightly.
So if you were to get a e36 M3 the 1995 would be your best bet. If you wanted to get a newer e36 then get the 328. The 328 OBDII has a lot of potential as far as mods go. My friend has brought his to 224 rwhp, but his e36 328 can outhandle my e36 M3 anydya of the week courtesy of pss coilovers, UUC Swaybars, 255 width tires, newer rsm's, and also lower control arms.