Sorry I took so long to get back to you. The stuff you are talking about is very complicated, and short of recommending you go read a bunch of textbooks front to back, I'd suggest just starting with some basic nutrition to get a foundation there, before getting into stuff like blood sugar + brain function.
This article will give you a good primer on nutrition with a focus on gaining weight:
http://www.barbellmedicine.com/potpourri/584/
If you have any other specific question I'd be happy to chat through them but HN is probably not the best venue. My contact info is in my profile, I love talking about this stuff so feel free to reach out.