The question holds a mysterious snag - the Sram ESP derailleurs are, I think 1:1 actuation ratio and can only be replaced with another 1:1 actuation ratio derailleur - basically any SRAM MTB derailleur. A shimano (or sunrace or suntour or other) derailleur will not work as they are designed for 2:1 ratio shifters!
8 speed bikes work great with 9 speed derailleurs, though... I don't think 9 speed bikes work as well with 8 speed derailleurs.
Keep in mind I have never owned a Sram derailleur, so I am not 100% sure. A bike shop will be able to tell you if this is correct.