Mathematics or software engineering? I am currently in a dilemma and could not decide where I am going in the future.

My undergraduate and master degree is in software engineering and I am currently doing a computer science PhD. I did well and I had participated in more than 5 projects with more than 100,000 lines of programming experience. About 5 years ago I started to grow interest in mathematics although I never had chance to spare much time to learn it.

Now my wife has got an offer in math PhD. In the summer I finally dedicate 3 months to learn graduate level mathematics. When I say "dedicated", I wrote a study note on Real Analysis with about 50,000 words in three months! I type in every word I learned from the textbook, made illustrations using Mathematica and wrote my understanding whenever it is possible.

Then I grew an idea to transfer to mathematics PhD. To achieve this goal I even participated in my wife's classes and did homework in order to get recommendation letters. I was planning to study probability, statistics and numerics that are more near to computer science if I got admitted.

However, this plan is strongly vetoed by my family members and my PhD adviser. None of them agree, including my wife. The main reason is that our universities are not top ones (the math dept. of my wife's math department is ranked about 80+ by Us News and 2nd tier by AMS) and we examined recent graduated PhD's jobs and got pretty shocked -- almost none of them get tenure, and most of them did 6 or 7 years in math but their current jobs get paid 30%~40% below software engineers (accroding to glassdoor) even considering tax and life cost differences.

There was only one exception who did another PhD in statistics in Wharton School of Business for additional 5 years and tenured at a top-10 statistics department. He did 10 years in PhD in total. This is also a possible path for us but it took a really long time and the future is of uncertainty.

I am currently 2nd year in CS. My current adviser told me in 3 years I am guaranteed to get a high pay in software companies. And under his sway even my wife told me she wants to enter software industry. My adviser's words to my wife is "you have learned advanced math pretty well and that proves you are smart. If in addition you learn computer things and then your will one of the best. ". 

Yes most of these companies value more about programming and algorithm skills than your mathematics. Those mathematical stuff in CS like "machine learning", "pattern recognition" are not of daily use in software if you don't get a research position.

I am really in a confusion right now I need to decide and focus. Otherwise I would not be able to excel in either direction. So I post here hoping that someone can give some opinion. Thank you!
I understand your confusion to opt an interest or to go with skills which will yield you a corporate job. I had been in the same pass; I thought to leave my PhD in Electronics Engineering and join PhD programme in Biophotonics. I got full tuition waiver with a handsome scholarship from a top UK university but I considered the following points to reach a conclusion.

Firstly, there are many more industry jobs for electronics people when compared to a Biophotonics PhD. Secondly, I can always try for teaching positions with a PhD in electronics engineering i.e. I have two career paths to choose from. However, if I talk about Biophotonics PhD, chances to find a job in industry would be pretty less (given my undergrads in electronics engineering). Ultimately, I'll be forced to find a birth place in some university or college. Salaries in universities/college when compared to corporate world needs no introduction.

I would suggest you to carry on your PhD in Software Engineering and you can always work on Mathematics after your PhD (obviously not in the form of a PhD). Mathematical research doesn't needs lab as such so you can carry on your research after your office hours and do publish them.

Another important point, you will spend ages to gain a ninja level of mathematics knowledge which is essential to finish your PhD in Mathematics (if you enroll). That being said, where is the progression in the life? Personally, I am a strong follower of "Money is the ultimate motivation" and don't overlook your family anytime while taking a decision. (I continued my PhD in electronics engineering and after graduating I have a nicely paying job in industry.)