The ECU is located in the back left corner of the engine compartment as you face it. You'll see a black piece directly below the back corner. You have to take that off and the cover underneath that. Becareful though on with the negative battery teminal right infront of that. You can fry the ECU as it comes out if it hits that terminal, but then again apparently yours is already fried. All that holds it in is 2 clips and friction. I do believe that it just pulls out.
I think the E36 96 and newer ECU will work for you, but wait for some one else to confirm that.
Are you sure that its the ECU and not the Coil or spark plugs? I don't mean to say you don't know, but I'm just wondering who told you that the ECU was bad.