Whoa, whoa, back up there.
How the hell do you know who he was texting while he was working out? Either he told you (so you are definitely friends and nothing more, sorry), or you're spying on him.
Neither one bodes well for a relationship.
He has been using you as a crutch to talk to. And now that you've revealed that it affected you, he's put on the brakes and created conditions you cannot fulfill, such as 'no more women with kids'.
He has probably never seen you as a serious love interest, I'm sorry to say. More likely, he basically crafted you into his therapist surrogate. And he needs therapy, BTW (I am no doctor, but I can see this one from miles away). Getting over an abusive relationship and figuring out how to prevent that from happening again is something a person works out with an impartial professional.
As for you, you've gotten way too invested in him, and now, unfortunately, that has hurt you.
So! You need to push him back. I'm sorry if you don't like this idea, but he's not having any of it in terms of a relationship with you, and he really needs to pay a therapist instead of getting advice and mixed message cuddles from you. Next time he wants to spill his guts over his ex or her kid or whatever, call a time out and strongly suggest he talk to a professional. He has issues which go above and beyond the standard friend relationship and you, personally, need to step back because it is affecting you.
He may think you're being unreasonable. Let him - and that should tell you a lot about how he really sees you. Or maybe he'll be understanding, and will realize he's been leading you on and denying himself healing all at the same time.
And - I know it can be tough to meet people, but maybe stop trying to do that at work, okay? Because what happens if it doesn't work out, or it works out just like this? If the guy stays with the gym, then you have a bad day when you see him, and if he doesn't, then he quits and the gym loses money (which could potentially directly affect whether you stay employed at all). Surely there are other ways for you to meet men, whether through Meetup groups or online dating or taking a class.