I have had the same problem - I've only been riding for about 3 years, so I don't beat myself up over it TOO much, but here are some recommendations.

I've found that when I'm out doing my own thing on a familiar trail, I'll go explore a new part and have no problems. I believe this is because I can go at my own pace, that I don't feel pressured - which is funny because I'm the only one ever pressuring myself! So after a few times of trying a new side trails, I've gained alot of confidence.

Also - sing! If I'm coming to a new part that I'm not so sure of, I'll put a tune in my head so that I don't listen to that "other" voice that tells me to dismount, and before I know it I'm thru that area

Good luck!