I'm glad you went. It's really difficult when you've been skipping and are feeling negative about it so it was really brave of you to go and you should be proud of yourself. Better to be late than not go at all!
Would it be worth talking to the teacher about your worries/health issues meaning you're missing classes and seeing if he can help? Maybe he can send across some extra reading material to help you feel more caught up.