No, a horcrux cannot be made accidentally, and Harry was not a horcrux
“By an act of evil — the supreme act of evil. By commiting murder.
Killing rips the soul apart. The wizard intent upon creating a Horcrux
would use the damage to his advantage: He would encase the torn
portion —” “Encase? But how —?” “There is a spell, do not ask me, I
don’t know!” said Slughorn shaking his head like an old elephant
bothered by mosquitoes. “Do I look as though I have tried it — do I
look like a killer?”
-Harry Potter and the Half-blood Prince
Voldemort clearly didn't kill Harry successfully. He might have intended to make a horcrux, but he didn't succeed. JKR has confirmed that Harry was not a horcrux.
"Here is the thing: for convenience, I had Dumbledore say to Harry,
"You were the Horcrux he never meant to make," but I think, by
definition, a Horcrux has to be made intentionally. So because
Voldemort never went through the grotesque process that I imagine
creates a Horcrux with Harry, (SU: Mm-hm.) it was just that he had
destabilized his soul so much that it split when he was hit by the
backfiring curse. And so this part of it flies off, and attaches to
the only living thing in the room. A part of it flees in the
very-close-to-death limbo state that Voldemort then goes on and exists
in. I suppose it's very close to being a Horcrux, but Harry did not
become an evil object. He didn't have curses upon him that the other
Horcruxes had. He himself was not contaminated by carrying this bit of
parasitic soul."
-JKR's interview