I'm no diagnostician, that's for sure, but what you describe sounds much like what I went through when I had a hyper-thyroid condition called Graves disease. It's a tricky thing to treat, as getting the replacement thyroid hormone right is like pin-the-tail-on-the-donkey. I also literally doubled in weight, after being rail-thin all my life.
But the trouble sleeping, racing mind, snappish behavior, and so on are classic signs of an overactive thyroid.