Bad shots, bad holes, and bad rounds are gonna happen. The trick is figuring out how to mentally stay in the shot and not let the bad shot,hole, or round become more.
I remember when I played in high school the golfers would come off the course to the range. They would tell the coach to look at there swing and fix them. He would ask what happened and they would tell your same story. Our coach would tell them to remove everything from their pockets and put a tee in their right pocket. Not because the swing was flawed but the mental game was flawed.
Keep your head up and stay positive