Trying to lose and get in shape with low blood sugar

I love to workout and be active but 2 years ago I was diagnosed with epilepsy. I have low blood sugar issues and when I try to diet and exercise it seems I always have problems with getting sick.
I end up giving up on my diet because of staying so sick. When I leave the gym I get nauseous and light headed every single time. .... but I keep going. I eat before so I'm not sure why it keeps happening.
I'd like some advice to get going on a healthy program again please.