Disclaimer: I am about 99% certain this is not some weird internal Google feature (not on the gmail team, don't worry), but it's also been > 1 week since I had to go through this performance so I may have forgotten some detail.
If you really want to keep them separated, you should just use Chrome's multi user accounts or their equivalent in other browsers.
Actually, you explained the problem without noticing it: "It just uses the first account you logged in with." Maybe it should be default account? Because "first account" will always change in round robin fashion because cookies will expire first for the newer account (which is second) and then after you login it will become first.
I guess it might not work well if you click a random link somewhere with two accounts open simultaneously, although I have a bit of sympathy for them there because that does seem kinda tricky to solve.
1. Sign in to personal Gmail by going to gmail.google.com 2. Sign in to work Gmail by going to mail.google.com/a/foo.com (obviously, replace foo.com with your work domain)