First things first, about the book thing, like, it's always worth checking out if a book is public domain before buying it, because if it is then it's easy to find it for free online, so it's ok, just a simple mistake, as long as we learn from our mistakes it should be ok.
Now, if you're talking about a book that isn't public domain, then a free download is probably piracy, in that case then you can literally download any book you want to buy for free, which i won't judge because i pirate all of my books for college (Medschool books are ridiculously expensive and there are too many, buying them now is unreasonable), like, it's wrong, but what i try to think is: Right now i literally can't afford this stuff, once i'm older and more independent financially, i'll buy them, as a way of thanking the people who made it.
Ok, now getting to the college stuff, i don't know what advice to give about the feelings of never being enough, of being lazy, etc, because i struggle with it too, so all i can say is that you're not alone in feeling like this.
Regarding the opening up to classmates thing, yeah, this can scare people off, so avoid it in the future, however, don't feel guilty or feel that you ruined your relationships with these people, because while they could have been scared off, the opposite could have happened too, so don't give up on being friends with the people you've opened up to, and don't be harsh on yourself.
Like, i was getting drunk with friends once, and we started talking about the first time we noticed one another, one of my friends told me that the first time he truly noticed me was when we were all having lunch together, and i opened up about a rejection from a girl i loved, that ultimately led to my depression (It wasn't the cause, things were already bad, but that was the last straw), immediately i felt kind of embarrased, like, i just felt ashamed, the earliest memory a dear friend of mine has of me was of me being an attention whore (Which i admit to being, i'm ashamed of it, but i can't help it), still, he followed up on that, and this is what surprised me the most, he said that his reaction was "He's just like me! I think we might get along!", like, he had depression due to relationship issues, and when i opened up he wasn't scared, he related to me and that created a connection.
Also, this moment he mentioned was in my first year of college, having lunch with a bunch of friends, all of them are still hanging out with me today, i didn't lose them. Like, what i'm saying is, i shouldn't have done it, at all, and i won't do it again, but even though i did, it didn't ruin my chances with those people completely, and it even increased my connection with one of them.