need some advice pleasee !!!!

so recently my boyfriend broke up with me because my bitching and spazzing came to the point where it was really bad and everyday... which i feel totally disgusted in myself.. cuz i pushed the man i love dearly away ... basically the reason it all started was when u got distant .. it happens every once in a while cuz he deals with depression and anxiety... so theres times where he likes to just close off and be by himself .. and i get everyone needs there space .. but this time is it was long then normal and i was getting upset cuz he wasnt giving me any attention or talking or anything ... at this point i went to my friend to talk about how i feel and she and her boyfriend kept saying he cheating on me.. i knew that was wrong ... but my brain does this thing where i over think .. so i basically got controlling and was bitching all the time... at the time i didnt see how bad it was and how it was affecting him and our relationship... i feel like a totally idiot because i let people get into my head.

now at this point in time i been talking to his bestfriend to see where his mind is at because i dont want to lose this man .. he the most amazing guy ever .. treated me like a princess.. accepted me for who i am .. his friend keeps saying to give it space, give it time. which i understand and i am doing ! i just dont know how long i should wait to mag him or should i wait till he msgs me first??? what should i do ? and how do i go abouts winning him back ?