i am having a relationship problem and its affecting my mental health

my girlfriend broke up with me and i am somewhat okay with that but they have refused to let me see my child