the OP says "My objective is to better understand how computers work, how ruby works, and generally to be a better software engineer." I just gave him options.
Start learning 8086 or more commonly known a x86 Assembly... That will get you much closer to the hardware and will give you entirely new sets of problems to solve and an immense knowledge of how computers work.
Guaranteed to make you a better software engineer.
I will tell you this... it is a real issue. I have a similar issue in life as I get bored with a teacher standing in front of me talking theory, and I too deal with the depression...
My advice to you would be looking into certs... I have been doing alot of self education and I believe certs will give you not only the proof that you know a topic but the feeling of completeness.
I am 23 I will be 24 this month on the 28th, I have been actively programming since I was 12 and I have been doing it for a living since before I graduated high school in 2010. I recently began taking courses at my local community college to bring up my GPA which was a 1.9 when I left due to some of the same reasons you didn't do so well. I lived to prove that you can be successful without a degree, my family told me I would never amount to anything without a college degree, and I am making around 125K in Detroit, MI where the median salary is 35K.
With all of that being said, just take the small steps in the right direction, I know I have and its a good feeling.