Everyone has something in common I think, so even if the character looks nothing like me at first glance, I would pick out what parts of their character I can relate too. This might just be what drives their mindsets and behavior. I would make a specific effort to figure out their mindset and why they like the things they like and do what they do so I can write them as realistically and consistently as possible