It sounds to me as though you don’t have the same understanding of duties and responsibilities of parenthood as he does.
If this were my marriage, I would wait for a good time when you both aren’t hungry, angry, lonely, or tired (HALT). Make sure you won’t be interrupted by the kids or anything else. Tell him “We need to talk.” Needless to say, he has to be off the computer and not surfing on his phone, either.
(BTW, I hate to bring this up, but what is he doing on the computer? Is there any way he could be viewing internet pornography? My husband is a dedicated gamer, but if I need him to help with something, he’ll pause the game or go somewhere in game where he won’t be attacked, and come help me with it. At the same time, if he’s playing with his brothers–who live across the country–I try not to interrupt him unless it’s brief or I really need the help with something immediately, because I know that spending time with them is important to him. I can’t imagine him throwing an adult version of a temper tantrum because I asked him to do something important rather than get on the computer.)
Be blunt but kind: “I’m five months pregnant and my knee is killing me. I need you to step up and help a lot around here because I can’t do this by myself. I need you to help with X, Y, and Z. If you need me to show you how to do Y, then I’ll be happy to; just tell me. You’re so good with A, B, and C (list some things here that he is good about, or mention that you understand how tiring his job must be, or whatever fits for your situation), and I hate to have to ask you, but I can’t do this anymore. Is there anything I can do to help you do these things, or any task of yours that I can take over (obviously, only take on what you actually can, perhaps “sitting” tasks like bill paying or something similar) so that you’ll be able to fit in these other tasks easier?”
You can also specifically discuss things like the grocery incident: “When you didn’t help me with the groceries, I felt ignored and put-upon. I am five months pregnant and stressed so I’m probably a little overemotional right now, but I’ll try not to overreact if you’ll also try to be patient with me.” (I’m not saying you did overreact, just that I can definitely imagine having something like that hurt worse if I was five months pregnant, tired, and in pain, know what I mean?)
Then listen to him. If he walks away from you, tell him point-blank that that isn’t acceptable. That’s incredibly rude and disrespectful. If you were having a discussion with one of your kids and he walked away when you were in mid-sentence, you wouldn’t tolerate it, right? Then don’t put up with it from your husband, who is most CERTAINLY old enough to know better and ought to honor you over just about everyone else. If he persists in this kind of behavior, I strongly suggest that you both meet with a priest or counselor to discuss appropriate ways of communicating and arguing.
If he argues that he isn’t feeling well, express sympathy but don’t go overboard. Acknowledge that he isn’t feeling well, but point out that neither do you, and still certain tasks must be accomplished: laundry has to be washed, groceries must be purchased and put away, the kids have to be watched, and dinner has to be put on the table. Ask him what he thinks a reasonable division of those tasks would be, and discuss from there.
I can’t emphasize enough to be specific rather than general. “You’re so lazy!” might be true, but it won’t help the discussion. “I can’t do X, Y and Z and they need to be done” is specific, and he can help with problem-solving on that.
As for acting like a jerk with the kids, call him on it. Tell him something like “I love you too much to let you behave like a jerk. You weren’t being kind or fair when you spoke to Mary earlier. She’s only eight, and she isn’t going to understand that she can’t do X unless you explain it.” Do NOT do this in front of the kids. They should see parents with a united front.
Did he come from a family with a lot of kids, or just a few, or was he an only child? Did his parents wait on him a lot? I ask this because the sort of person you’re describing doesn’t really sound as though he’s had a lot of responsibility before. Frankly, his behavior sounds a lot like that of a spoiled brat. Spoiled brats aren’t irredeemable, but they do need to learn a different way of behaving. Is he Catholic, and was his father around when he was growing up?
Finally, see if some tasks can be simplified or just not done until the baby is here and you have recovered. Ask him to go to the doctor’s with you the next time you go, and ask the doctor specific questions about your physical limitations and what you can and can’t do. Sometimes hearing that kind of thing from an outside source helps a person to understand better than if they hear it from someone they see every day.