Eather your need all new seals and clean out the entire engine which in the long run might cost as much as a new engine. Expect to pay around 5 grand eather way you look at it.
Also Dudesky the M50 was in every E36 325 92'-95' and every E34 525 from 91'-95'