The first time I ever blacked out was in emerald on that last trainer before petalburg (Nelgected to heal my pokemon) otherwise, I rarely lost, and it would be because of something stupid (Level 7s I forgot to put in the PC don't make good battlers it seems) I had alot of trouble with the battle frontier since I had no knowlage of competive battling, at the time, but I figured it out and destroyed the place.
To this day I rarely lose offline, and 99% of the time, it's because I was stupid and forgot something cruical....most recently I was going on a challenge and forgot blue had a pidgey, and guess what kind of pokemon I had? It also didn't help that I forgot he appeared on that route (second battle, route leading to E4, forget the name) low PP and health weren't much of a help either