In the interim, perhaps you could investigate an online university to get you back on track. And, during your job search, please be careful to avoid any place where wheat is present. Once your brain fog is gone and your strength returns, I hope a plan of action will be apparent to you...but you'll need to plan carefully. I do wish you all the best--you sound like a very nice, genuinely caring person, and you don't deserve to have these types of setbacks.
Regarding your urine, I would like to encourage you to see a specialist about it. You may be experiencing a health issue unrelated to gluten that is affecting your health. What you describe is NOT normal, and a urologist may be able to help you. Please do not delay in contacting a doctor NOW--these types of matters can be very serious....but easily resolved. Here's a link to the Mayo Clinic where foamy urine is discussed--it indicates that there may be too much protein in your urine:
Good luck to you!