In any country people will annoy you in some way. When you are a foreigner it may be more difficult to handle people who cause you problems in your daily life because for one you may fall into blaming or hating the whole country at times. If one reads the many blogs out there by foreigners in Japan, or if you are a foreigner in Japan you will be aware of the attitudes and comments people have. One thing you will rarely if ever hear or read as a solution to the people who bother you is pray for them!
I only started to do this recently and wish I had been able to do it sooner as it really helps me deal with people who would otherwise be mentally bothering me. For example If you look anything other than Japanese you are guaranteed to be stared at or looked at, in a way that makes you think the person is a jerk, at least once. One thing to do is to say something in your native language or in Japanese even simply konnichiwa. Besides that though you could also say a simple prayer for them asking God to help show them that what they are doing is rude. Maybe the reason you have crossed paths with this person is because God wants you to pray for them because that person needs your prayers and without them they would go on in error. Pray for them plus when the situation warrants it take verbal or physical action too such as walking out of the room, switching train cars, or saying something to them. If you think you can not pray for someone because they are such a jerk etc then ask God to help you be able to pray for others.
There is an expression in Japanese and an attitude of “shoganai” meaning it cant be helped and foreigners may find this really irritating. I say it can be helped because at the very least you can pray and God can do something.
You can also pray to another person’s guardian angel and ask their angel to help that person. Yes most people in Japan do not know they have one but that doesn’t mean their angel isn’t there or has no influence over them because the angel is there and does have influence.
In any country anytime someone bothers you pray for them.