The engine in your car is from BMW's engine family M30. Any M30 engine from the late 60's to the mid 80's is a virtual drop-in if you use your original carburetors and possibly other peripherals from your original engine. You can find M30's in 2.8, 3.0, 3.3, and 3.5 liter displacements. All the blocks and heads are interchangeable and close to identical.
You can find M30 engines in other e9's, the e3/Bavaria, e12 original 5 series, e24 6 series, e23 7 series, and e28 second generation 5 series. The bottom end of the engines is quite durable, so a used engine with under 150k miles can often be installed with no significant work. It's wise to replace front and rear crank seals, and if they look brittle or worn, the timing chain guides.