Transferring out of Rank 1 PhD program to another PhD program
Right around the first midterm of every course I feel like just throwing it all away (I have multiple degrees and working on another one right now). It's the same feeling I have right before I go out to a party that I want to go to but will have a lot of people.  I think it's just anxiety.  What's the worst case?  You have to take the course again?  You're concerned that you don't have enough background?  Think instead of all the cool stuff you still get to learn.  I had a CS professor who asked the class,  "who has heard of 3-SAT?"  No one raised their hand.  You could tell the excitement in her voice.  "I get to be the person who teaches you 3-SAT!"  Think of it that way.  Someday you will learn 3-SAT, and a million other great things.  Now go study!