Boyfriend has feelings for another girl
For more background context see my previous discussion from last year titled 'Valid concerns or am I just being paranoid/unfair/insecure?'
My boyfriend has a friend he's known for 8/9 years and their families are friends and have always done stuff together in the summer. Throughout that time, he and she kind of had summer flings at varying levels, but nothing more serious than just talking a lot or holding hands (as far as I know). He's also known me for 7/8 years and alongside his summer flings with her we've liked each other on and off throughout that time. The summer of 2016 was quite bad because I liked him but he liked her and talked about holding hands with her and I felt really insecure. Then she started dating another boy, and in 2018 my boyfriend and I started dating.
Throughout our relationship he's still talked to her and done stuff with her family in the summer, and occasionally it's cause a bit of tension. Last summer we were in a bit of a rough patch having lived together during lockdown, probably way too soon, and largely because my mental health was making things very hard for me and I wasn't being that good to him. I went on holiday with my family and while I was away he and his family went to a camp, and she went to. At that camp, she told him she liked him and he didn't tell me about this until a week and a half later, but we were already having hard conversations about whether we should be together when we were both unhappy. After he told me about her telling him she liked him, we had a horrible month of very tough conversations and I was still struggling a lot with my mental health. In the end, we decided to stay together and work on being better.
We had a good few months, but now it's getting hard again. He says he set some sort of boundaries with her in the summer of what's too far when he's in a relationship, but they both still have feelings for each other. I feel very jealous and insecure about him talking to her, and it's so hard because how can I get over it when it's not irrational, there's literally a reason to feel like he's going to leave me? We talk about it regularly and we both know we have things to work on, for me it's managing my mental health, not letting my jealousy and insecurity make me angry with him for small things, and trying to be okay with him talking to her and doing things with her. I don't have any friends and he's literally all I have, so it makes me feel even more lonely when he wants to do stuff with someone else. I'm also scared that I should break up with him if their feelings for each other are just going to continue to cause issues in our relationship, because how can I stay with him and feel secure knowing that he likes someone else? He says they're not "saving" each other, as in keeping each other as their back up or just thinking that they're destined to be together, but it really feels like they are and that he only started dating me in the first place because she wasn't available. I love him more than anything but this is causing me so much pain and making my mental health struggles even harder to live with and I'm worried I should leave for my own good but that I'm only staying with him because without him I'd be completely online. He says he wants to be with me and I want to work on our issues, but there's a lot going on and I'm worried we won't be able to move past this.
This is a very messy ramble and I apologise, but does anyone have any advice for dealing with my boyfriend having feelings for someone else and how I can accept it and not be jealous/clingy/smothering? I'm scared of the answer to this, but am I doing the wrong thing by staying with him?
mod edit: added line breaks