You are definitely not a failure. When we are struggling or fail a test, paper, even a class we are still learning. Sometimes what we learn is that we need to change our approach to studying or we need extra help.
Have you contacted the instructor or a school guidance counselor to get another opinion on what you can do to get things turned around in these classes? That would be a great place to start because it also shows them that you want to do well and you are seeking out their help.
If your school work has been a problem only recently, there could be something else going on.
Sometimes other things in your life make it difficult to concentrate on your studies--problems at home or with friends.
Whatever the case may be, reaching out for help from those who know you and can help is important.
Good luck.
Sincerely,
Grant, Hotline Counselor