HELP!!

So my boyfriend and I have been together for 3 years now and we have a kid together well we broke up for about a month or so and he moved to California with some girl when he got back we got back together after a couple of weeks but when we went to have sex he couldn't stay hard and it like really hurt my feelings and it happened two days in a row I don't know what to do or how to feel it just makes me feel bad about myself