Anti-Sora appears when you use drive forms over and over again in short periods of time.
In KH2 I found several ways to always have a full drive gauge, giving me the ability to use drives whenever I wanted. But after using drives a few times in a row, without much time inbetween, i would turn into Anti-Sora. And once i turned into him, afterwards I would have a empty drive gauge, causing me to have to refill it to use drives again.
Everytime you use a drive, your one step closer to anti-form.
Also, using Master form reduces your chance of getting anti-form.
Mickey appears during these boss fights:
Dark thorn (Beasts Castle)
Cerberus (Olympus Coliseum)
The Hydra (Olympus Coliseum)
Xaldin (Beasts Castle)
Storm Rider (Land of Dragons)
Grim Reaper (Port Royal)
Second Xemnas Battle (World That Never Was)