I think it would be really cool for a jdrama or kdrama to be about a  white American who speaks either Korean or Japanese going to school in Korea or Japan and how he integrates himself into the society and how he deals with prejudice. Along the way he would make friends have girlfriends etc...  Has this been done?

I don't really recall a drama like that... Actually not many dramas even have foreigners - and even less in leading roles at that. I would imagine that a drama/movie with such story would usually not be Korean/Japanese but foreign production in itself. For example, there's an movie called "Stupeur et tremblements". In that one a Belgian woman goes to Japan for work but ends up very humiliated. It's a view into Japanese corporate and as such not what you are looking for - and I have a feeling you'd rather a see bit happier story - but I suppose you could use that as a starting point.

There is also an Japanese movie called "My Darling Is a Foreigner" that is more matching your description.
I would love to see one like that in korean dramas. New kind of feeling if you can watch that one. I watch some of that in movies but its in Philippines. Of course the main lead girl is pure korean and its Sandara Park. She star in several movies in just a span of two years and one movie was she portrayed think a half fil half korean who came to the Philippines because she was forced to stay with her filipina mom and live there with her and she don't like it at first but then later on she adjusted very well or something like that. She was paired with her with her real boyfriend that time (now ex). But I am not sure if that is applicable in Korea. Few half korean half other races barely have lead roles and its always supporting role or other wise just cameo roles. In my country, almost all actors there has mix of races. Fil-am, fil-brit,fil-german, fil-japanese, fil-chinese, fil-spanish, fil-italian. You name it. And even other actors that doesn't have filipino blood sometimes lead in a drama or a movie like sandara park and ryan bang and one  brazilian-japanese model and actor who won big brother filipino version. So basically it's really up to the korean society if they are willing to see this kind of stuff so that their entertainment industry will grow in terms of beind interconnected with other races. I am not familiar with Japan because I rarely watch their dramas.
there's something about half-Filipino, half-Japanese. i learned from this movie how they treat someone who is not full japanese
Smile
nopee... the only thing i've seen are some foreigners or half-asian people in dramas/movies. but they usually arent the focus and their status doesnt really come up. (i.e. love for beginners, itakiss2, gomenne seishun, my little hero) ...well my little hero does show the prejudice
There is a Movie called "Memoirs Of A Teenage Amnesiac" where Japanese kids go to school in America , the cast is mixed (Japanese and American Actors) , to name a few Anton Yelchin , Emma Roberts , Horikita Maki (Hana Kimi and Nobuta wo Produce) ,  very interesting movie

http://mydramalist.com/208-memoirs-of-a-teenage-amnesiac
So far, the only drama I saw with a non-asian as a main lead is Tamra, the Island but it's a period drama.