I'd say don't get the M3 if you are not planning on tracking the car. A 335i will get you 90% of the thrills if you do any kind of performance driving. A 335i will also get you better gas mileage (a lot better) and is easier to drive on a daily basis.
That said the M3 is more fun to drive fast if you want to spend more. The 335i's lack of an LSD and overheating problems really cripples the car when it comes to track use.