I am a Doctor. Please go and see your GP, you need to stop overusing ibuprofen- you are definitely at risk causing yourself harm. And you also need help to address the headaches/migraines and period pains you are having.
i would reassure you that ibuprofen does not have any addictive properties, per se, in the way opiates such as codeine or tramadol do. Your body will not become dependent on them in the same way. But, you can become psychologically reliant on them- patients take them in anticipation as they want to avoid the pain, worry/are convinced that if they don’t they will be sore etc, so they feel they just have take them. It can become a compulsion for some people. So, you would be unlikely to get the physical side-effects that you would get from cessation of an opiate (nausea/vomiting, stomach cramps, sweats, shaking/tremor etc), but it can feel frightening having to stop- i get that.
In answer to your question regarding risking your health- yes, you are risking some potentially very serious complications. You are taking far too much ibuprofen- I think you must be taking up to 2000mg or 4000mg per day (depending on whether your tablets are 200mg or 400mg). The recommended dose for most adults is 1200mg in 24 hours (400mg up to three times daily). Worst case scenario is you are taking over 3 times the recommended daily dose, and doing so on a frequent basis.
Taking ibuprofen- which is from a group of drugs called non-steroidal anti-inflammatory drugs, or NSAIDs)- frequently, even within the recommended dose, carries a risk of causing gastrointestinal irritation and if patients have to do this for a period of time, they are often prescribed medication to take alongside these ( usually a PPI, such as omeprazole) to reduce these risks. At higher doses, or if taken frequently, NSAIDs can cause gastritis, stomach or small bowel ulceration and even gastro-intestinal bleeds. You might get quite bad heartburn/ reflux as a first symptom. Overuse can also cause kidney problems for some people, though this tends to be more of a problem if overdose is significant or if the patients has other factors like dehydration or infection, or is elderly. If you are significantly exceeding recommended dosage and doing so frequently you are putting yourself at higher risk of these complications.
You say you are getting frequent migraines/headaches despite taking amitriptyline (I assume as a prophylactic to try and reduce the frequency of migraine). The issue you have here is that you may be getting medication overuse headaches (headaches actually related to taking medication frequently is a well recognised phenomenon). You could be getting these as well as migraine, or perhaps they are overuse headaches and not migraines now. It’s going to be hard to tell if you’ve been taking medication daily for a while. It may be you need to stop the ibuprofen altogether- you may find headaches worsen initially but they will taper off- in order to do this. It could be that amitriptyline is not the right prophylactic for you. It might be that you need help to identify your triggers (not always easy) and reduce or mitigate your exposure to them (if possible). Your GP can help with this, but sometimes they will have to refer to a headache specialist if standard protocol for treatment is not working or any uncertainty regarding diagnosis. For instance, in our area the headache clinic will only accept referrals for patients who have failed to respond to 3 relievers (treatment for the headache) and tried at a minimum of 2 prophylactic, or failed response to 3 prophylactics if the reliever is effective.
As for period pain- if this is problematic (beyond normal level of cramps/pain), again you need to speak to your GP about it. This could also require further investigation and better treatment of it is causing you to overuse ibuprofen to such an extent.
please see your GP, explain honestly what is happening and what you have been taking, and get the help you need.