Key to remain calm and with cool head is to be in control of your investment. If you are in control of what is going on, you can be cool enough to make solid decisions. Otherwise, panic happens when things get out of control. I have to add that emotions are the ones that trigger your actions. Thinking is a passive process. So instead of controlling or switching off emotions (which is impossible as already said), we can focus on controlling the money we put into trading, including proper risk management.
I also agree about the important of perseverance, especially if you improve something with each new iteration.