Putting up walls actually is damaging. Humans are not meant to be isolated, so when we isolate ourselves it goes against our mental, emotional and even physical health.
There are two parts to being around others.
1) learn to spot the toxic ones and identify the healthier ones
2) expect to be hurt to some degree
There are good and bad people on this earth, and often times we attract certain types with our speech, body language and behavior. Some of these are open invitations to people that victimize others. Or attract people that don't intentionally hurt you, but are unstable enough themselves, emotionally or mentally, that they seem to leave a trail of destruction and barely notice.
Everyone hurts everyone else. No matter what form of relationship, no matter the closeness or level of trust earned. You hurt people too. Some people will hurt you in large ways, or frequently. Others not so much. Some enjoy it, some regret it and a few don't know it.
Use frequency and severity of them hurting you to judge if you continue trusting and staying with someone.
Use wisdom to find answers, not pain to justify more pain.
As far as God goes, I've seen that more often than not people put themselves in situations, suffer the consequences and then blame God. Check yourself and see if you're doing anything to cause yourself pain. People usually respond with immediate denial and give it no thought, like I used to. Once I learned to not accuse God when my mistakes got me, the happier I was.
I became very sick years ago. I went through years and years of doctor visits, ER trips, medical procedures, things going wrong, new things coming up as a result of the first. It's been 9 years since it all started getting bad (years before that the problems started on a lesser scale). But guess what. It's my fault. Nine years later and I'm still having problems
I will require more surgeries and a lifetime of visits to specialists.
There were steps I could've taken to prevent it all together. I didn't. It's not God's fault I ended up here. And God doesn't "owe me" a healing. This whole situation was easier because I didn't blame God for my choices. Like I did in the past and often struggled with not feeling God.
Check your expectations on others. Some people tend to expect too much from others and when they can't live up to that expectation you can take it as a slight against you, when it's really you expecting too much and taking too personal when people fail.
Lastly, ensure you aren't overly sensitive. I'm not accusing you, it's just something anyone in your position needs to face. More often than not there is at least some degree of this going on.
If you're wondering I went through all you're going through and am speaking from experience and the wisdom others shared with me. It took me nearly 20 years to figure all this out and apply it.
The bible is full of people that suffered. Some for a short while, others for longer. Some their fault, some were acted upon against their will. Yet even reading Psalms and how often he seemed to feel God has left him, he trusted, rather than blamed because he knew God was still there and working, even if he couldn't see it. Something to consider in that example.