I told my bf something his wife had told me a while back about the reason she stays with him and now he’s really hurt and crushed and I feel really guilty for ever telling him and he keeps going on and on about how he wanted to be with her forever and stuff and I feel really conflicted because earlier before I had told him I wanted to marry him and he said he wanted to marry me too and now I feel stupid for saying that and I regret saying either thing. I just feel like an idiot.
There isn’t really a question here - but it sounds like you’ve gotten yourself into a spot of drama. In general, telling someone a thing that someone else told you is a good way to start drama, even if telling them was the right thing to do. Sometimes, drama is unavoidable. Sometimes it’s an inevitable consequence of doing something you needed to do. Other times, it’s entirely avoidable and the consequence of someone making a bad call.
No one mistake defines a person - you can be someone who didn’t use great judgment at one point in your past, and that just makes you human. Exactly nobody is their best self 100% of the time. So maybe you messed up and created a messy situation - do your best to fix it, apologize to who you need to apologize to, figure out how to prevent it from happening again. Say you didn’t mess up and you feel your bf did genuinely need to know what his wife said - stick to your principles but don’t do anything further to escalate the situation.
Remember that drama, hurt feelings, fights, etc. are entirely survivable. They feel miserable, and you might feel shame, regret, guilt, anger, frustration, exhaustion, or any other thing - but those will not kill you. You can ride this out. Even if the drama is of Epic Proportions and it ends a relationship, you’ll still live through it. Try to find some humor - will any of this make a good story someday? - or, if there really isn’t anything remotely enjoyable in the drama, look for a lesson to be learned and a way to improve in the future, even if all you learn is “I can feel really, really bad, and still get through it.”