Give yourself permission to have screwed up to what is, actually, a rather minor degree.
You were taken in, you stopped it quickly, and your reaction was anything but reception. The other guy tried to take advantage of your vulnerability. That's not being a friend. That's an attempt to use you.
You are okay - don't sweat it.
Now, what about the future? Maybe try confiding in a therapist instead of a 'pal' who's got an agenda. Not that therapists never, ever do, but we have laws against them taking advantage of their patients.
Also, talk to your boyfriend. Sit down with him.
I'm concerned. I want us to continue. Let's work things out.
And see what happens.