Are you doing any damage to the Avatar? He does have a lot of HP, so the battle will be a longer than most in the game.
Mind Flay is in the Eastern Vale. It's well-hidden, so you will need to explore carefully.
Hint: travel around the northern part of the map.