Don’t beat yourself up about it. This is part of the learning curve. Sometimes we need to experience such events for the repercussions to sink into our psyche. In time, as the painful memory fades, you will likely repeat this mistake.
I’ve been where you are more times than I would have liked. Now I keep telling myself that growing my account is a marathon, not a sprint. It takes a single bad trade to set you back weeks if you increase your position size on a whim. Write your account management and risk management rules in stone until you have a pressing need to change parameters and then change things in small measures with considerable thought given to the matter.
Since you are a new trader I suggest that you trade with no more than 0.25% risk until you are consistently able to grow your account for at least 3 - 4 months consecutively. Then increase your risk per trade slowly until you build up to 2 or 3%. I still place trades at 0.5% or less if I’m not absolutely confident about the outcome.