Jesus dude, you just don't get it.
When things are bad they don't get better instantly. You helped her through a tough break up (friend zoned there by the way), then you helped boost her confidence after said break up. She told you she had a crush, you confessed feelings (2 different things by the way), she most likely realised that you liked her more than she liked you, so literally showed you she wasn't interested. From that point on, for her it would have been awkward so she slowly backed away. The friendship was dead before you and her stopped talking.
At this point, there is no getting the friendship back. If you run in to each other a decade or so down the track, things might be different.
'People are never perfect but love can be. People waste time looking for the perfect lover rather than creating the perfect love' - Princess Leigh-Cheri from Still Life With Woodpecker.