The reason you both are being snappy towards each other and not always getting along is because you both are suffering a loss and don't know how to deal with it, you want answers as to why and your boyfriend may have shut it out so not to think about it. You don't quite know how to grieve for your baby. It sounds as if you both need some grief counseling they can show you how to go through the grief process together instead of against each other. What you have to do is realize that it wasn't your fault also you said in your question that you know it's not his fault but my question to you is do you realize it's not your fault also? Sometimes in life things just happen there is not reason why you know the old saying, "what doesn't kill us will make us stronger" well sometimes we realize that we are not strong enough to handle it on our own and sometimes we need a little help with that.
Patience is the most incredible emotion to show a loved one to help get through tough times. Don't let stress and pain take over your relationship, you have to be each others support system. Realize that if you are not careful this can damage your relationship, try staying away from blaming each other for what you had no control over. Everything is possible when love and patience are present. Maybe you could try a support group of people who have suffered the same loss that you have, someone who can relate and possibly give you the tools to get through this together. Don't let upset feelings infect your relationship. Resentment towards each other only closes the door on communication and getting your feelings out always be honest with the way you are feeling, holding those feelings in only makes things worse and when it comes to fighting makes the fighting more intense. Truly loving someone that love gives way to constant forgiveness. Everybody likes the idea of forgiveness until they have to be the one to forgive. If you want your relationship to work, you must learn forgiveness.
Stand together against the pain and hurt you are feeling, promise each other that you will endure throughout the storms. People commonly choose to withdraw from each other at times of trouble. This distance may feel safer but it is harming and damaging the relationship. If you truly love your partner then vow "We will get through this, Together!" If there is goodness in your relationship, then it is worth fighting for. Just consider talking to either a counselor, your clergyman (if you have one), your doctor, a support group, or a good friend that has gone through something similar. Don't try to take this on, on your own it will only overwhelm and consume you.