I can regret something I did, something I said, something I didn't say (but should have), etc.
I can feel pity (sadness, sorrow) for someone's bad luck, their unfortunate situation, that they lost their job, etc.
A general rule of thumb to differentiate how/when to use each word might be that regret is about ME whereas pity is about something or someone else.