Is my career over if thesis went bad?
It's very hard to switch to a different advisor or even a comparable school when your thesis goes bad.  This is because the first question a potential advisor would ask is what happened with your old advisor ... if both you and the advisor don't have a reasonable answer to that, you will have a very hard time.

That said, there are alternatives:


You could try working for a year or two and then returning to PhD studies.
You could try switching to a different area.  There are lots of areas where a student with good mathematics abilities could find interesting problems (economics, computer science, physics, ...)
Switch to a less respectable school that might be willing to take a gamble on an unknown student with a good background.


In short, one of the most important decisions a student can make in his/her graduate career is an advisor.