You're not the loser.
You cannot think of it that way.
It's like when you go to a job interview; you may be great, but you're not great 'for that one position'. Savvy?
You mentioned yourself that this girl was kind of crazy. You're not meant to be her savior, and she just did not see you as someone to get romantically involved with (perhaps because you guys knew one another so well... after a while, she starts to see you as a weird brother-like figure).
As for the snaking, it seems women tend to do that. At the beginning of this year I was talking to this one girl I was friends with for a while. She had some surgery done (brain surgery) so I was concerned as a friend, more than anything. I have fooled around with the girl a bit... not a home run but 2nd-3rd base, but since she got sick I kinda stopped doing that, but I still cared enough to visit her.
When her operation was successfully completed, I would visit her to her house. She was weak and frail so I came over and gave her some company (nothing naughty). At one point she flat-out said she did not feel comfortable dating anyone, due to both her past, and her condition.
I understood that, and just hung out with her as friends for a while, but kept my distance because I wanted to pursue something more than just friendship (I have enough female friends).
I found out that this other guy (her personal trainer) started putting the moves on her and all of a sudden they were 'boyfriend and girlfriend'. At first I was kind of upset, what with that whole talk she had about her past and her surgery impeding with things, etc... sounded like it was just talk to brush me off, etc...
Then I found out the guy tried to get too rough with her and she did not like that and dumped him, then started talking to me again and getting close.
At that point I realized that I'm not the problem, nor am I the loser; this girl just was prone to getting into trouble and making bad decisions (and avoiding good men like yours truly). It was then that I decided to make myself unavailable to her; not to ignore her, but to just stop visiting, wait until she makes time, or sends a text, etc. You know, just to see where her mind truly is regarding me, whether as a friend or otherwise.
I've not gotten a text from her since May. It only confirms the revelation I already had. You don't want to be with someone who doesn't find you the right fit.
Since then I've been with a few quality women, and I'm happier for it.
Freak, learn to move on. It's not you, it's them. You tried your best, but if you have obstacles like an annoying parent or something like that, then don't even bother. Don't get too attached too early.
It's the secret to my success.