When you go out ridiing dont have any expectations. That way your never dissapointed. (Y)
But seriously this is what I do and I dont get stressed out much at all. If I cant do something that I know I can, after the first few go's of failing I will just go away and try something totally different to freshen up and then come back.
Riding the same place all the time wont help either. If you are riding the same place alot of the time then always try and come up with new lines or use different techniques to get up things you have riden a million times before, it keeps things interesting.
e.g if there is only a tiny wall, try it switch and things like that.