Hello sadi: I noticed this is your first post here on PC. So... welcome to PsychCentral!

I hope you find PC to be of benefit.
I'm sorry to read that you & your spouse are divorcing.

You asked about the "legal & right process." I'm not sure what you meant by that. But, as far as the legalities of divorce go, this is something that is going to be specific to the state within which you live. Each state has it's own laws. So I think this is something you would need to talk about with people in New Mexico if that is where you live... perhaps an attorney.
You also asked if this is the right thing to do. Here again, I don't think I can really tell you if it is the
right thing to do. But what I can say is that, unless you are being emotionally, verbally, & / or physically abused, no matter what else happens in your life, I believe you will always regret this even if you know it was what needed to be done.
Here are links to some articles, from PsychCentral's archives, that offer some perspective with regard to divorce:
https://psychcentral.com/blog/are-yo...ourself/?all=1
https://psychcentral.com/blog/5-divo...-splitting-up/
https://psychcentral.com/lib/extremi...se-of-divorce/
https://pro.psychcentral.com/exhaust...ing-a-divorce/
https://blogs.psychcentral.com/psych...ons-not-to-be/
https://psychcentral.com/blog/lettin...up-or-divorce/
I wish you & your family well...