Mathematics or software engineering?
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.)