Thanks for all the responses, it's great to have different perspectives. It is all a bit baffling when it's new territory for all of us (and we have got colossal upheaval going on elsewhere in the family).
I did have a quiet chat to DS1 about what was causing him to get cross and shout at nursery. It took a bit of time, but he did eventually tell me that he gets scared around the carpet times, he said "because there's too many children" and that when he feels scared he gets cross and shouts. There are actually only about eight children in his little group, but I think he gets anxious about not being the centre of attention because he is so used to it at home. It definitely seems to be anxiety rather than aggression.
I think Franny's right, it's inevitable that he will be aware of my mood and the fact that Grandma is off the scene atm. I'm not taking it out on him, or letting it affect his routine, but I can't pretend I'm a bundle of jollity at the moment, and he is very perceptive and sensitive (maybe all children are). And his little brother has been coming on in leaps and bounds lately, which is great for us but probably a bit intimidating for DS1 - things like DS2 starting to eat with a spoon by himself, which erode DS1's sense of being special because he's the big boy.
I don't know if it's silly but I made up a little simple ditty which just says "X is calming down now, lalala, calming down..." and told him I put Mummy magic into it, so that if he sings it to himself when he gets scared or cross, even if Mummy isn't there it will make him feel better. I also told him to go to his teacher at the start of group time and tell her that he feels a bit scared and would she please look after him.
When I picked him up today she said he had had a much better morning and although he was still quite wilful he had been more able to "compromise, talk about it and calm down". I think next week when I feel a bit less fragile myself I might arrange a proper meeting to discuss managing difficult behaviour and reporting it to me.
I think I will leave him at that nursery for a while longer, because it is a brand new nursery/preschool with great facilities and he says he likes it there. I will keep a close eye on things though. At least until this horrible situation with my mother has calmed down and I can see how he is when we're not all under strain. I'm sure there must have been some effect on him - I do my best, but the atmosphere in this house at the moment is not great.
Thanks so much for all your advice and thoughts, it really has been very helpful.