Bremen boosted their survival hopes with victory over northern rivals Hamburg, who ended the game with nine men.