The ending is bizarre. Good that despite all the other plot points like the cheating husband, the throughline is on how Martha deals with grief. It's not the stages of grief, but the struggle between allowing yourself to feel and living with social expectations. The courtroom speech is genuine but also not completely necessary, just good for drama.
He was ashamed, and he kept on being ashamed. He kept the shame going by having sex with men, 'cause that's what shame dose, it makes him think he deserves it. They are dying, and think, I brought this on myself. It's my fault because the sex that I love is killing me. The perfect virus came along to prove you right. He died because of you.