Punkin to fully answer this question I must ask, when he said we haven't had sex in three months. Did that sting? Do you have any fault in that? If yes, then he may have some justification. If no, then he is projecting his problems on to you.
Sex is very important to a man. It is the glue that sometimes hold a marriage together. His failure might be a projection on to you of why he is splitting up with you. He is blaming you for his lack of sex. He can't blame himself. That would be an adult thing to do. So it must be your fault! Who elses fault could it be? He has to blame someone.