Isn't it fun? The instance of a sharp curve when the bike is drifting sideways, everything counts: speed, amount of breaking and pedaling. Whenever the limit of the path is reached and there's no other way but going to crush, don't give up. Try to not completely block the wheels by breaking, because then, gravity force will take a good care of you leading you right into that nice peace of tree. Shift into lower gear and keep the smooth pedaling, direct the bike inside the curve. Gently pulling on the front wheel and redirecting the bike into right path also helps. That's how you build the confidence in yourself and your bike.
You gotta like the feeling as you get out of the curve!