i 23F have been dating my boyfriend 22M for 3.5 years, since our freshman year of university. before that we were classmates in school and we weren't really close, but we reconnected and started dating in university. looking back at it, i think we were both lonely and probably started dating to escape our loneliness with someone familiar, but we kept going because it was comfortable. we met each other's families and built something that felt real. we were planning to get married in two years, looking at apartments to live together and just planning the future together.
since i was 16 i knew i was bisexual and i was pretty open about it, but my family still doesn't know. we live in a country which is pretty homophobic and i'm unsure if coming out to my parents would be a good idea.
on the current situation: i met a girl 22F, we are taking a few courses in university together and i find myself attracted to her and she reciprocates. like, jokingly flirting, holding hands and stuff like that, nothing *too* boundary-crossing. adding to that, my relationship with my boyfriend became strained: small arguments, disagreements and him mostly scoling me for his own flagile ego. he could interrupt me when we're hanging out with friends, i would tell him to stfu and let me speak and later when we're alone he'd tell me something like 'you could say whatever you want when we're alone, but watch your mouth when we're with my friends', apparently because his friend gave him a weird look. it's slowly making me resent him. on top of that, i find myself uninterested in being intimate with him or honestly with any man. intimacy became more like a chore, not something i enthusiastically want to do.
so i really don't know what to do here. i don't know how to break up with him without ruining him (it's his first relationship and i can see how much he loves me), but at the same time i'm not sure if i can stay, because staying feels like sacrificing my own happiness. but at the same time me being in a relationship with a woman would be heavily judged by society we live in and i'm sure it wouldn't be accepted by my family.
TLDR: been with boyfriend for 3.5 years, don't think i'm attracted to him anymore, realized i might be gay because i'm having a crush on my female friend.
any advice would be appreciated.