Occasional failures in sexual acts are normal. You have rightly said that you have developed performance anxiety. This is what exactly happens in such type of cases. You need to relax about your performance and spend (or divert) more time in foreplay.