It is best to let it go - by not engaging further in the debate. I recommend the next thing you say to any of your friends be completely on another neutral topic, or just ask to agree to disagree, even be amicable about it if you are able.
Its good you are able to recognize that you can't change their mind - that is something I have struggled with for a long time. I sometimes simply can't understand how viewpoints that seem so obvious can be so different for people who have similar life patterns. Go with that feeling, be ok with it. Try the above exercise if you feel like you are up to it. Love the part of you that is smart enough to know you are right, and that it is not your failing that others cannot see how brilliant you are!
As for feeling better... The only thing that ever works for me is self-soothe in these cases. To get to sleep: klonopin (benzo) will also calm my thoughts and make me drowsy. If there is something I really want but normally shouldn't have I will have it (I like frozen treats). If that's not an available option to get something or have someone go get you something that will help, I also try cuddling with a pet or grooming them.
Again, its situational depending what works for you. But like I said, the only thing that helps short term for me is the benzo, long term: self-soothe, put the public communication away for a while, impose a short term of absence, even if it means unplugging and putting away your laptop, if possible.
I don't use facebook (except for my mom) because it is actually far far too triggering for me even when I don't engage - pics and comments alone can begin a spiral down. I don't know how any borderlines get past it unless they have only like one or two people on there.