About switching from a computer scientist to a mathematician
Theoretical computer scientists are already mathematicians.  So you don't need to do anything!

Your later comment suggests that you're really asking about changing from one area of mathematics (like complexity theory) to another (like functional analysis).  The only way to do it is to just do it.  You want to be an analyst?  Great!  Just start doing analysis!  Read analysis books and papers, solve analysis problems, talk to lots of analyst faculty and students, attend analysis seminars, go to analysis conferences, ask analysis questions on MathOverflow, and so on.  Act like an analyst long enough (and well enough) and you'll become one.

In that respect, becoming a functional analyst is not so different from becoming anything else.  Want to be a programmer?  Program!  Want to be a writer?  Write!  Want to be a painter?  Paint!  Want to be a functional analyst?  Analyze functions!  (Meanwhile, don't forget to earn enough money to eat, and do not blow off the stupid administrative hurdles.)

And yes, lots of people successfully change fields/careers.  For example, Joan Birman started her academic career in physics, worked for several years as a systems analyst in the aircraft industry, spent several more years at home raising kids, went back to grad school in mathematics in her 40s, and became one of the most influential researchers in modern low-dimensional topology and geometric group theory.  For other examples, see these questions on MathOverflow.

One last suggestion: You might find the transition somewhat smoother (possibly even real-analytic) if you drop your prejudices about "pure" versus "applied" mathematics.  Forget about the labels; just do the work.