As a trader we need to accept the fact that we will lose some of the time. If you understand this, then you must have measures in place to protect yourself from the losses when they come.
We can't avoid all losses, but we can manage our risk. The first thing you need to do is define your risk. One way to do this is simply by using a protective stop. Another way is to have a predefined number at which you will halt all trading if too much of your balance is lost. Know what your risk is in advance and have a plan to deal with it before you find yourself losing a large portion of your account.
A trader must not be to proud to go back to demo trading when they have a losing streak. We all need to keep our perspective and remember why we are trading in the first place. If we are trading as a hobby just expect to lose. If you are trading as a business and expect to make money then you need to follow some rules, set some parameters, and have the discipline to do what it takes to learn the trading business.