I am in systems Phd program, but I want to do theoretical research I am 3rd year Phd student. So far I have been doing systems research in top US university. I realized that I want to do theory (in particular machine learning (ML) theory), but unfortunately I do not have any publications in that area. I do not have good math background, I never majored in math, and I did only basic math classes back in undergrad more than 6 years ago. So you realize that my math skills are very-very weak. 
But I truly enjoy learning maths, read ML papers, read theory papers, even though I struggle. It makes me feel happy, intellectually inspired and motivated.
Meantime I completely do not care about systems research. 
That said I am def much much much less qualified than most Phd students in theory who majored in math, have tons of experience and publications.

Do I even have a chance to switch to theory? Should I even talked to professors? I am completely fine to stretch my Phd for the next 5-6 years (since if I switch I will need to start from the beginning and have a long period of learning).

Do you think I should give it a shot? Is it even feasible?
Of course you should give it a shot!  People switch fields all the time.  One of my most successful PhD students (in algorithms) started in my department as a systems PhD student.

Your first step should be to talk to faculty who do ML theory in your department, and ask them how to get involved, given your current background.  They might suggest classes to take for remediation; they might suggest specific papers to read/problems to work on that exploit your systems background; they might suggest first getting a master's degree (if you don't have one already) and then reapplying broadly to PhD programs.  If you are very very lucky, they may be willing to take you on as a student and offer you funding while you transition.

But one word of warning.  As I'm sure you already  know, competition for PhD admission in machine learning is incredibly fierce.  AI has always been the default subfield for smart CS students who want to go to grad school but really know what they want to do, but the popularity of machine learning has exploded over the last five years.  Last year, half of the almost 1000 applications for my CS department's PhD program listed AI/ML as their primary research area, and two-thirds listed AI/ML as a possible research area, even though only a small minority of our faculty work in that area.  (Of those roughly 500 applicants, we offered admission to about 50, and about 20 accepted our offer.)  This competition may make it harder for you to pursue a PhD in ML at your current institution.  That doesn't mean that moving to ML is impossible, but it may be difficult, and you may need to pursue multiple avenues to make it happen.

Best of luck!