There are 2 and 4 pin versions. I think generally our cars are supposed to have the 2 pin switches since we don't have "check control", but my car had a 4 pin as well. You just need a standard E36 4-pin brake switch . #61-31-8-360-417 I believe. Seems pretty common that they fail after a while. Mine did, and there's lots of threads on here about the same problem.
A little more info:
http://318ti.org/forum/showthread.php?t=23366 I got mine at AutoZone for just as cheap (probably cheaper) than Pelican or AutoHausAZ when I added-in shipping. Looks like it's their part #RB411 for $18.99. Lifetime Warranty. I was in stock so I was able to get it right away. The AutoZone switch was in a Duralast box I think, but it was made in Italy.