First of all, nothing’s wrong with you! You’re feeling down about your situation, but situations can be changed. It’s important to have the mindset that it’s temporary and to know that your situation will improve. If you have to, write down how you want your life to be in the future and read it to yourself every day. Remind yourself of the skills and value that you have and make small steps every day to move towards your goals.
Appearance - this is important, I’d work to make myself look, sound and smell very much the opposite of what you’d think a homeless person might look and smell like. Make sure you are clean, well groomed, and if you need to, ask people if they can help buy you some clothes that make you look presentable. Most homeless people ask for money on the street. They never ask for something specific. I believe if you ask for specific things you want - like ask someone if they can buy you a shirt to help you get a job, you will find someone that will do it. Don’t be afraid to ask people for help - I believe people want to help others.
You have by the sounds of it many skills. You’ve worked in a cafe and can provide references for that so I would go for that angle and look for cafe work.
If you need documents such as tenancy, first see if you can find a legitimate way of solving the problem, but tbh if I was in your position and needed documents I would just forge them - you have the skills and it’s not hard to do things like give someone a number of a friend and get them to pretend to be someone.
You might want to make a living out of programming, but you need to look after your living situation first. Go for the low hanging fruit, get a cafe job and work your way up slowly from there. Get away from the other homeless people and get into a hostel. Make new friends and focus your mind on things away from the dramas of living as a homeless person.
Good luck! Be strong and small steps every day.