I completely understand where you are coming from. You start to feel worthless and think back to what you did wrong. This exact situation happened with Duke just two weeks ago and I was devastated.
However, this year was probably the hardest for us and they often have to prioritize funding towards American students and it is nothing we can control, especially during times like this. Please keep your head up, apply for research positions and continue pushing forward. Everyone I know who took a two year gap (including myself) do not regret it one bit. Everything happens for a reason and I truly believe there is something good coming soon for you.