hiii there, you are not a failure. you weren't ready for uni at 18 and that is okay. you shouldn't have to go under that much stress and pressure if you aren't ready and 22 is not old at all. do not worry about your friends, they will graduate but so will you. everyone completes things at different times, it isn't a race and you should take your time. it doesn't matter that you're 22 because you're now more prepared and this means you will be less stressed, meaning you will get better grades or marks and you will be more satisfied. please do not compare yourself. you're doing well for going back and you should be proud of yourself as it isn't easy.
i'm 18 (supposed to be in first year in uni) and i wasn't ready for a levels at 16 as i wasn't mentally prepared so now i have saved my motivation and now i know what career path i want to take as i haven't rushed. i will be 20 going into university and i am not embarrassed. you shouldn't feel embarrassed. you are young and you will be young when you graduate. there will be people your age on your course possibly and i wish you all the best <3