relationship advice

so my bf and i broke up about a little while ago because his mother passed away and he wasn’t able to give me the attention and love he said i deserved. he told me when he was ready and dealt with his issues going on in his mind, it may lead to us together the future. we started talking again in more of a relationship type way (flirty) recently and are most likely getting back together soon. is it ok to go back to my ex in this situation? ( we are both only 16 and i was there through his entire struggle with his mother. we had been together for almost 2 years ) help!!! i’m confused and conflicted on what to do!