The overthinking of the F word reminds me of a chapter in L.M. Montgomery's Anne of Avonlea, which was published in 1909! In that case, Anne encourages young Davey to say the bad word out loud, and then he's able to let go of it. I don't know if that would help in this case, or maybe reading that part of the book with your DD would help to let her know that she's not the first to feel this way and won't be the last.

Otherwise, I would suggest encouraging her to deliberately turn her thoughts away from the overthinking to something she enjoys, preferably something calming, like the plot of a favourite book or movie, or her pet, etc.

Good luck!