Like the others have said, try to develop a bankroll management plan like the one Ferguson used and stick with it. Now I think the tough part is the latter, which is sticking with the whatever management plan you come up with. For instance, Ferguson's rule states that if at any point in a cash game, the chips on the table represent a certain percentage of your bankroll (I believe 10%), you need to leave the table. But from what I have experienced and have heard from some others, it's tough to leave when you're running well.
Also, out of curiosity, has anyone created a bankroll management tracking spreadsheet? I have one that I created through Excel but it's all convoluted and not sure if that's the best method for me to track.