It may not suit your goals, but one approach is to enroll in a masters program before entering a doctoral program. This could help you get back into the groove of academic life,
and also give you a chance to meet new professors who could write letters for your application to a more high-powered doctoral program. (I once advised a student who had spent quite a long time, maybe 8 years, in the software industry before returning to academia, and
this is the route she took. I think it served her well; because of the masters, which involved a mixture of coursework and a small thesis, she was very solidly prepared for her doctoral work, and was one of the strongest students in her cohort.)
I am going to give a non-serious answer, but there is a serious point behind. Lots of current and former mathematicians and theoretical computer scientists excelled in other fields. Here is my top 10 list:
1) You can change your name and start selling puzzles.
2) You can drop out and start a company (this or that, whatever).
3) You can start a hugely successful hedge fund which will in turn employ over a hundred other Ph.D's.
4) You can write a popular book explaining why people can't count.
5) You can write a comic book, a very good one.
6) You can write three volumes of a proposed seven volume monograph, get upset over its print quality, invent a new way, write a manual on it, and sell these and other books in dozens of languages.
7) You can design a bomb.
8) Why stop on a bomb? You can move to NJ and design a computer.
9) You can start a company selling in bulk a number-theoretic algorithm accessible to undergraduates.
10) In the good old days you could become French Minister of the Interior, but it helps to be friends with an Emperor.
UPDATE: while writing I discarded a few other career choices which I felt were somehow "less relevant", such as Iraqi Oil Minister, Russian oligarch, or even World Scrabble Champion.
Best Answer
I know several people who got jobs in industry, doing work entirely unrelated to the topic of their Ph.D. theses (and to anything else they learned as students). The people who hired them seemed to have the attitude that they want to hire smart people who can learn the relevant background information reasonably quickly, can understand the problems they should work on, can make a real contribution to solving them, and can communicate effectively with other employees (not just with other mathematicians). The Ph.D. degree in mathematics strongly suggests (though it doesn't strictly imply) that one has at least some of these qualities. Letters of recommendation and interviews add more of the desired information (or of its negation).