Dealing with a loss especially for the first time as a newbie trader will depend on the amount. If you traded more than you were prepared to lose, then it would have a very bad psychological effect which is enough to make one quit trading for good. That's why it's advisable to trade in small amounts when starting out.
I though it was the same with loss in gambling . It costs you a bunch of money cause of your mistakes so time will cure it and give your more experiences to easily been through it if you're in that scenario again.