My name is XXXXX XXXXX I'm a licensed attorney (State Bar of Texas). Glad to try and help out.
I am truly sorry to hear about your troubles. My heart goes out to you.
Here is how this works as a matter of both state and federal law. It's entirely up to you what you do with this information, but here is the accurate truth.
Texas is what we call a one-party consent state, pursuant to Tex. Penal Code Ann. §16.D2(c)(4). That means you can record conversations between you and your spouse as long as one party (meaning you), is aware of the recording.
That much is quite clear, and it follows the federal approach codified at 18 U.S.C. §2511(d). Of course, neither state or federal law condone such interception or recording for unlawful purposes (i.e. to commit a criminal offense or a civil tort).
Now, beyond that, you're on rather shaky ground. You can't record anything involving a third party, period. In other words, that would include conversations or encounters (audio, visual, electronic, both) between your spouse and a lover, for example. Also, devices that record computer key strokes, web site visits, vehicle routes are so forth are all off the table.
Today, there is an entire chapter devoted to computer crimes. Here are those provisions spelling out the various elements:
Texas Penal Code § 33.01 et seq.
These situations, especially when they involve marital infidelity, are incredibly painful. In all candor, however, I've had potential clients come to me with hours and hours of such proof. I've had the unhappy job of explaining that their efforts were for naught, as the evidence would be inadmissible at trial on a number of grounds. All I'm saying if I would urge an abundance of caution.
Frankly, the very best favor you could do to help your case would be to confer with local family law counsel right now rather than waiting down the road. I can tell you where I would turn, were I in your shoes. Each attorney is previously screened, the fee of $20 is the best bargain around (includes both the referral and the actual attorney consultation time), and the source is the most reliable and trustworthy, namely the State Bar of Texas:
Lawyer Referral Information Service
If you have a follow-up question or need clarification, please just say the word by using "reply" to reach me.
I hope all works out for you.