If I am trying a low percentage shot, I try to leave the cue ball in a position to make it difficult for my opponent should I miss. Keep in mind, a safety is not necessarily a shot that leaves your opponent no shot. Making it difficult on your opponent is often enough. The object is to win the game, not prove to your opponent that you know how to make difficult shots. By playing within your limitations, you increase your chances of remaining focused.
Most players loose their focus trying to play over their heads.
Trying shots, of which you are not confident, will result in misses that will leave your opponent open. It is easy to lose focus after a few misses. If you want to try difficult shots, try during practice, not a tournament or league game. If, when you approach the table, you know you will not try something stupid, there is less reason to feel anxious. If you are relaxed, it is easier to remain focused.