You have your Bsc and MCA with four years of experience in IT. many struggles to get a good job in the industry now. I respect your decision or desire to change the career direction now. Please consider the financial commitments, outstanding loans, children's education plans and major responsibilities. Have a rough idea of the money you receive every month, including all the fringe benefits before and after tax, it would give an idea what would be your expectations and what a teaching career would pay you.
For a government job as a teacher with PG qualifications, you need to take up the UGC NET or State equivalent of this exam. The NET exam comes with an age limit, for example for the UGC NET 2018, the age limit is 28 years as of 1st Jan 2019. There is an age relaxation for reservation candidates or differently abled people up to 5 years.
You can choose to write th TGT or PGT exams to become a teacher of Computer in Government and KV schools. ALl these will need a B.Ed course before you can be eligible for the TGT/PGT exams. Some states have an age limit of 32 or 36 years for these exams, please check this and add the time taken for you the enroll and finish the B.Ed course.
In some private institutions, teachers are recruited with a flexible age limit, again this depends on the region and the teaching entry level.
If age is on your side and you do not have major financial commitments, then pursue your dream to change career, make ground plans and the if possible opt for a part-time employment, enroll for BEd by distance mode from IGNOU and move on.
If age is on the wrong side and you have unavoidable commitments financially, then please be practical before changing over.
Midlife crisis is more common than we believe it to be, it would often be seen around the 40s but now it's common around 35s. Apart from being caught in the monotonous life, being unhappy, dissatisfaction with employment is a key finding. It takes a couple of years to passby, we can find many articles and how to deal with it on the web.