In a gangbox with switches on two different circuits, how can I identify which neutrals are associated with which circuit?
Are the breakers adjacent?  If so, you're probably looking at a multi-wire branch circuit which should--but doesn't--have an approved tie-bar device between the two breakers, and which would use one neutral for both sides of the circuit.

Multi-wire branch circuits are safe when both branches are powered and when both branches are off.  They can in some cases be dangerous if one side is powered and the other isn't.

If this isn't multi-wire branch circuit wiring, I doubt that it's safe at all.  It appears that black and blue are two hot wires entering from #5, which has one neutral return.  If black and blue are anti-phase, as in a multi-wire branch circuit, the maximum current on the neutral will be the difference between the current on the black and blue wires, so the neutrals cannot be overloaded without tripping a breaker.  If they're not wired anti-phase, however, the current on the neutral wire will be the sum of the currents on the black and blue wires.  If devices on each circuit are drawing 20A, the current in the neutral wire will be 40A--dangerously overloaded.