you can use books sure, but don't let them shut your brain off. Learning the process of formulating good differentials takes time and years and continues into residency as you see more and are able to compartmentalize better.
A few tips:
1. A differential can be formed for an individual symptom, an individual physical exam sign, and indvidual laboratory abnormality/EKG feature/imaging abnormality. Those are generally very broad, though occasionally you'll stumble across one with a rather limited differential.
2. Based on that, think of forming a differential as a google search. You can use individiual terms or you can combine terms into a single search. A differential for a pair or trio of findings is inifinitely narrower because it only includes those diagnoses that cross over. The differential for a febrile cough is narrower than the differential for a fever and differential for a cough.
3. You can get too narrow if you focus on the wrong symptoms. experience is the only thing that can help with this.
4. If you're stuck, always think of all organ systems that could be involved. epigastric pain radiating to the back for instance. what's in that general region of your body that is that far posterior? your aorta, your stomach, your gallbladder, your pancreas.
5. Alternative is what I'm sure you see everyone else doing. Make 5-7 categories of pathophys/organ system processes: Metabolic, Oncologic, Infectious, Toxicologic, Central Nervous System, CV, autoimmune, hematologic, etc. Go through each individually and think of every process you can think of and see if that matches up with your symptom/sign/abnormality. If a category is empty (it probably will not be), then move onto the next.
6. If you don't have the knowledge, you won't be able to put something on your differential. As you continue with your education you'll learn more and more disease processes. If someone has something on their differential that you're not familiar with, don't feel bad. Just learn it and it can be on your own differential next time.