What do I do ? Help me

Okay so I have a two year old daughter and I love her more than life itself . When I got pregnant with her I was going through a lot . Before I got pregnant with her I was in a relationship that ended the end of July . We had a really bad break up . I slept with an old boyfriend middle of august . Found out I was pregnant September 13th . My first instinct was that I was pregnant with the guy from Augusts baby when I mentioned it to him he said he couldn’t have kids and me being 18 and stupid I believe him and when I went to the doctor the told me I was 9 weeks which I thought dated back to July Me not knowing how pregnancy works I didn’t realize that the weeks include your last cycle so I then assumed that it was my ex from July so I told him and we got back together. I later found out the guy from August had 2 other kids on the way so I asked my doctor when did I get pregnant and they told me mid August . I tried to talk to the guy from august and he wanted nothing to do with me and the guy from July was so excited and his family already was buying stuff I was 8 months then . So I kept on letting him believe it was his daughter she was named after him and all . Now she’s almost three and looks exactly like the guy from august . But the guy from July believes it’s his daughter and me and him have another child and are still together and him and his family love her to death . But it really is starting to eat me alive .how do I go about things without everything falling apart ? I don’t want to hurt anybody but I don’t want to keep lying and lie to my daughter . I know I should’ve done the right thing to begin with but I was so scared