Yes and no. Crush follows two episodes in which you can see the two of them developing a connection and having "a moment", but having Spike's feelings exposed in that manner (and having mucking it further up by being wildly inappropriate and morally clueless) throws everything into relief and it's totally understandable that Buffy freaks out and reacts the ways she does. However Crush is not the only episode of the season; as I said, the previous episode showed a tentative "something" developing between them, and when Spike does prove that his feelings are genuine and that he has the potential to do better, Buffy reacts with a romantic gesture :
she kisses him, which she had never done with someone she wasn't romantically interested in, and starts trusting him and including him in her life. And that's all before S6.
So the attraction was there prior to her depression; she just gave herself the permission (as
@AstridDante said) to act on it because she was too desperate to care about the standards that she had set for herself. With that in mind, there are other scenarii in which it could have happened, though under different circumstances the outcome probably would've been different as well.