Salvage title cars are not necessarily bad. You just have to be prepared to use some of the savings over a good title car to fix any problems that arise. May be some, may be none. $25k is a good price, so that leaves you money for repairs if necessary. The only problem is that if you dump a bunch in repairs and then want to sell the car, you will be at a greater loss.
While I own an E90M3, I am not sure it is that much better than a 335i with full bolt on mods.