For me this happened a little later in life. Late elementary school early middle school? I cried every night and felt so much pent up guilt for little things. They would stew in my head, I dreaded bedtime because I knew I'd need to spill all these worked up things in my head to my mom when she said goodnight otherwise I'd feel worse and cry all night until I told her. At one point I challenged myself because I didn't know why it was happening. I know now that it was anxiety attacks, and am on medication for it.
I am a kindergarten teacher and have seen this happen with children which the family is going through some kind of difficult time. Such as a divorce, death in the family or a deployment. Separation anxiety can look like different things to different children and families. As a teacher, I keep close communication with the family and make sure the child feels safe at school, especially safe to make mistakes. I usually recommend that that family seek outside help if the problem doesnt subside, such as family counseling or a church pastor or leader. Create a good relationship with your daughters teacher. My heart goes out to you and your family. My son has Aspergers and being a parent of a special child and an educator, I am cautious of diagnosing a child with a firm label at 6 years old unless the tested diagnosis is very clear. You can still get help at school and at home! There is hope.
Sounds an awful lot like OCD
I went through a period like this as a child, I was an army brat and my dad was SF. It started after a night where I had a complete emotional breakdown thinking that my dad wouldn't come home from deployment as we were not allowed to know where his deployments were, only when he would be getting back, and when he was supposed to be home had gotten pushed back. This led to and obsession with death and eventually I became germaphobic, not to the extremes but nevertheless I developed OCD symptoms that carried on through my life. I am now 24 getting out of the army and the only explanation I can really offer is that while being an army brat builds resilliancy, you are more prone to psychological tics due to the constant stress. Individual stressful experiences don't lead to psychological change but constant stress does. And this doesn't just come from deployments but also moving around a lot. Things that have helped me didn't come until later in my life. Ultimately a better understanding of what you do is what she needs. I didn't reach full closure on the situation until I deployed on my own. But every time my dad got in depth on the bigger picture of why he fought the bad guys my symptoms improved a little. I became stronger for it. Knowing is half the battle and that's what she needs, especially because little girls are more emotional than little boys are as children. And OCD manifests in different ways. Sorry if this response is late and long winded, but it hits home. I wish you and your daughter the best.
Believe it or not, kids who confess and go on and on about negative behaviors they claim to have committed are most likely witnessing a classmate get attention for bad behavior. I've worked in an elementary school now for 5 years and find when adults/teachers reward a child for negative and/or bad behaviors other kids feel left out and want more attention. They feel left out and don't like the attention the other kid gets...your child may be getting brushed off or told 'good job' then have attention moved to a child with behavioral and/or social issues.
I havent read all the responses to you, so sorry if someone suggested already that you look into PANDAS (also called PANS).PANDAS is short for Pediatric Autoimmune Neuropsychiatric Disorders Associated with Streptococcal Infections. A child may be diagnosed with PANDAS when Obsessive compulsive disorder (OCD) and/or tic disorders suddenly appear following a strep infection (such as strep throat or scarlet fever). Often a long course of antibiotics can help. That was all we needed to help my 5 year old son. But it was a difficult & scary journey inbetween. I believe the longer it goes untreated, the harder to repair. Google it for more info. There are groups on facebook for parents, too, where you can get helpful info. Good luck.