I think its very unlikely that you will go to jail if you ever make a human mistake . it does sound like anxiety and over thinking things and looking for the worse possible scenario.
Do you do anything for fun when you are not at work ? Home hobbies or the gym or something that could help you relax and take your mind off work .
Please try not to stress about it , I'm sure you will be fine .
Do you have a therapist ? They might be able to help with the other thinking