Just heard from my psych that I'm likely BPD.  All the pieces seem to fit into place.

When I was a kid I was diagnosed with Asperger's, although many of the ASD-specific symptoms lessened with age.  What never went away and instead intensified was a difficulty in regulating emotions.  I was a bit of an asshole as a boy.

In elementary school I'd write racial slurs backwards on my assignments, get into tons of fights, make death threats, etc.  This resulted in frequent confinement in a "safe room" and having to talk to the police on a couple occasions (which was especially problematic the time I attempted to get away).  Left public school after third grade when the district issued what essentially amounted to an ultimatum of either sending me to a specialized program for kids with behavior problems or arranging for me to be homeschooled.  Considered running away or killing myself at around this time.  My father was an alcoholic and would get into regular fights with both my mother and me.  I remember on one occasion throwing a knife that embedded itself in the wall above my mother's head, and trying a bit of my dad's beer when I was 10.

School always pissed me off immensely.  Not because I disliked learning, but because I was terribly bored.  My Special Interest in elementary school was paleontology, which obviously isn't regularly taught to children of that age.  So I slogged through classes and read academic papers and textbooks on my own.  It might've been better if I'd been given more advanced work through the district's gifted program.  Unfortunately for me, the program didn't use individual IQ test results on the basis that to do so would be unfair to those who couldn't pay a psych to administer testing.  Instead they relied on results from group achievement and learned ability tests.  School anxiety led to dramatic underperformance there.  To illustrate how significant the difference was, I scored a below-average 94 on the verbal section of the group test as a kindergartner.  In third grade, when I was given the WISC-IV individually, the VCI (verbal IQ) score was 164 with extended norms.  For years I only knew about the group test results, which led me to believe I was stupid.

In sixth grade I returned to public school.  That year I read an email my father sent to my math teacher after I'd scored 40% on a quiz, which suggested I might have a non-verbal learning disorder.  I didn't think I did and was angered by the suggestion that I was incapable of doing math.  I'd never really put effort into the subject but resolved to study it outside of school using Khan Academy and my father's textbooks.  As it turned out, I greatly enjoyed it and was pretty quick to pick up new concepts.  In seventh grade I got up to (single-variable) calculus.

This only resulted in more boredom in school.  I started getting into fights again (fueled in part by being bullied for being an "autistic retard" who had to take a special ed homeroom class and in part by being made fun of for thinness and short stature), hacking school computers, and engaging in vandalism.  The response to this misbehavior only amplified my desire to stick it to the man.

I managed to get promoted into precalc in 8th grade by taking classes over the summer.  This was still terribly boring since I already knew the material.  At first I simply didn't do homework and only showed up for tests, though this eventually progressed to complete school refusal.

After sorta dropping out at the end of middle school, I made the decision to attend a private one-on-one high school.  The tradeoff between social opportunities and academic ones seemed worth it.  Though I'd had many more friends in middle school, I wouldn't have been given the chance to take AP Physics C as a freshman or complex analysis and quantum as a sophomore at public HS.  I hoped to gain admittance to college early through a special program I applied to in 10th grade.  I had a near-perfect GPA and a perfect score on the ACT.  I was rejected.

For a while I thought I'd give up on school and on becoming a biophysicist (which was my intended profession at the time - I later decided I'd rather be a mathematician).  But I managed to pull through.  The next year I began taking courses at both a local university and a local CC.  By the time in senior year I applied for full-time uni, these consisted of mainly grad-level math but with some undergrad bio, linguistics, and physics thrown in as well.  

I was rejected from two of the three summer programs I applied to in junior year.  Clearly, I realized, I couldn't be at all intelligent or capable of achieving my goals.  But I still wanted to keep going on the off chance I'd get lucky.  The one I attended was an international program in number theory.  Though I found the math interesting, I had difficulty connecting with the other students.  They seemed to socialize with ease but walled off from me in some way.  I'd always get anxious when trying to overcome my social inhibitions.  I even wound up putting suboptimal effort into the math itself as I felt I wasn't smart enough for the other students and didn't belong there.

I began using substances to cope with the pressure of taking twice as many courses as I probably should've and waiting on university decisions.  At first I snorted a small amount of prescription stims to stay up finishing homework, then drank to forget my worries, and eventually progressed to doing things quite a bit worse for me.  The feeling of emptiness inside that had steadily been growing for years worsened significantly.  To feel something and externalize some of the worry, I also started self-harming with a razor.  Having to use these things as crutches made me feel pathetic and immature, which only fed into the cycle of self-hatred.  Obviously I'm a callow pussy.  Can't even tell my extremely liberal parents that I'm bi.  Although performing well in my classes was easy, it felt fake.  Somebody else pulling the controls, somebody else behind the wheel.  Who am I?

I thought I'd extricate myself from the pit.  Things were looking up for a while.  I was nominated as a candidate for US Presidential Scholar (for which I was strung along as a Semifinalist but inevitably eliminated in the final selection) and started work on a research project with a professor who'd taught a seminar I was in.  But then I received results for the colleges I'd applied to.  Six out of nine rejected me, including all the ones I was at all interested in attending.  Caltech was my dream school and my fluid dynamics prof had strongly recommended I go there.  The day I received that rejection I intentionally OD'd and wound up in the hospital for a few days.

I had outstanding work in five of my classes at that point.  I only finished it for one, failing the other four.  I lied to those around me about my progress on the work and instead spent my time screwing around on the internet and getting high.  To tell the truth, I wanted to sabotage myself.  I felt I wasn't a real human being, my choice of high school had been a total loss (since I'd now never be able to socialize properly and probably would've gotten into a better university if I'd had a more conventional background in terms of extracurriculars), and that I'd rather die than live a life of mediocrity (typical black and white).  Now I've not graduated high school and am dropping out.  Obviously all my fault, and I don't blame anybody else for it.  My brain is just fucked.  I deserve this pain.  I own it.

I've handwaved to my parents about becoming a writer or freelance programmer but I don't think I'll ever be able to do anything of the sort.  The emptiness is there.  I can't enjoy those things.  Only math used to fill the void but it no longer does.  I've probably damaged my brain to the point of not being smart enough to become a professor anyway.  All that's left seems to be enjoying the downfall.

My greatest achievement in the past few months has been getting myself addicted to cocaine.  It's a bad bandage.  To hide the problem isn't to fix it.  But I can't fix the loneliness.  I'm just an average guy who got really fucking lucky in some ways and managed to screw himself over.  Work doesn't matter.  Thinking doesn't matter.  All I want is to be able to genuinely connect.  I have no IRL friends.  Although I'm not a virgin I've never maintained an LTR and am afraid that if I try I'll not be enough.  I've got the typical cycle of feeling overly close to people and pushing them away.  I'd be a burden anyway.  Doesn't help that it would be impossible with the only person I have strong feelings for.

So it may be time to slip further down.  Or not.  I want to fix myself but I don't know how.  DBT as recommended by my therapist seems promising.  But if the problem is *me* I don't see how it's possible.