The professor said that, it doesn’t matter even if you’re at the bottom of the class. It is all about perspective, out of 6 billion people on earth, where do you actually stand?
It is ridiculous to put yourself into a group of 200 odd people and being utterly depressed for continuously failing. For three years you have been failing very BADLY, and you may still are, and you might still be failing in the near future, far longer than you’d hope for. But it is not always gonna be that way. You’re going to learn a lot from it, but only if you work HARD now, stay until the end and be content to accept whatever consequences that may appear. Learn from your mistakes, young man.
Someday, you will make it, someday you will succeed.