Hey, I am definitely not qualified enough to diagnose you with any specific eating disorder, however I can tell you that what you described does seem like you're having a problem with your diet and food intake. Eating 300 calories a day and taking an excessive amount of diet pills isn't goo no matter who you are. Your body needs more nutrients than that.
To start, you said that you're clinically underweight. This alone doesn't indicate an eating disorder, however the fact that you are extremely paranoid about your weight and eating habits does indicate that you may be struggling with an eating disorder. Additionally, as I said, 300 calories just isn't enough food to stay healthy. Even if you weren't underweight, you shouldn't be eating that little. Important functions in your body slow down when it's not getting enough food, such as the immune system, sleep cycles, memory, and metabolism. You might be losing weight by eating so few calories, but you definitely aren't doing your body any favors in the process. As far as taking diet pills go, many are explicitly designed for people who are overweight and NEED to lose the weight. They can actually be quite dangerous if you're taking them despite being underweight and not eating enough. In addition to that, the primary function of most diet pills is to speed up your metabolism. If your metabolism is already being affected by starving yourself, it's entirely possible that you are really messing with your metabolism a lot.
The second thing that indicates to me that this is an eating problem instead of just an unusual diet is that you described it as a 'cycle' that you aren't sure how to end. If you've tried to stop eating like this, but are unable to, that's a clear sign that you are in a sense 'addicted' to your eating habits. Something like that is reason enough to talk to a doctor about trying to fix some of these eating behaviors.
I understand that it's definitely harder than it sounds to just say 'Ok I might have an eating disorder and need help.' Oftentimes it can be really hard to talk to friends and family about these things. You said that you're friends have already mentioned that they're worried about you, so maybe this would be a good place to start. Next time the subject comes up, instead of denying that you have a problem you could admit to them that you've been a little worried too. Tell them just what you told me, and ask for their support. Odds are that they'll be more than happy to help you through this. Once you admit things to your friends, your parents might be a bit easier. They might seem like they don't understand or care at times, but I'm fairly certain that if you came to them with this, they would do what they could to get you some help for everything.
In the long run, I think it's important that you at least get in to talk to a doctor about this. As I said, it sounds to me like you have an eating problem but there's no way I can diagnose you with anything. I'm not qualified to do something like that. A doctor would be able to screen you for a number of different types of eating disorder, as well as check your physical health. From there, they can get you into some sort of follow-up treatment which will most likely include both cognitive therapy as well as regular appointments to check on your physical progress.
It might seem intimidating to go through all this, but I think that it really is something you need to look into. If you continue to treat your body like you are now, you're eventually going to start to run into some serious health issues. Eating disorders are definitely possible to beat, but it's hard to do it alone. Take the first step and try to get some help with this. It will be well worth it in the long run.
If you have any other questions or need to talk to someone about this, feel free to PM me. I would be happy to help you out with this.
Take care.
-Isobel