☛ A different point of view
I offer a somewhat different version. Hume is an empiricist in the sense that he believes that our primary knowledge derives purely from experience : seeing and hearing, for example, and such experience is the realm of 'impressions'. We could say, of sense-based beliefs. Ideas derive from impressions : I hear a sound (impression) and remember hearing a sound (idea derived from impression). That's the basic picture. The full picture is more complicated but the basic picture will serve for now.
☛ Hume on causation
Hume notes that the ordinary concept of causation involves an assumption of necessity. Causes necessitate their effects; given the cause, the effect cannot but happen. Hume steps back from this assumption. If all knowledge derives ultimately from experience, when do we ever experience necessity ? What would such an experience be like ? If we examine our experience, he tells us, all we can experience (at most) is regularity, not necessity. Watch me when I drop a thin glass on to a stone floor. All you actually experience is a succession of impressions which you could record as follows : I hold the glass, it falls from my hand, it descends, it encounters the stone, it breaks. All this is real enough but where in any of that did you experience necessity ? You just had a succession of impressions and none of those impressions was an impression of necessity.
Hume explains causation (roughly) through the regularity of B-type events (impressions) following A-type events (impressions). Thin glass so often breaks when dropped on stone, that we expect this to happen and project necessity into it. People so often die when they drink sulphuric acid that we say the drinking of the acid caused death; you can't drink a litre of sulphuric acid and survive. But all that experience vouchsafes is that death was followed by drinking and this is a regular sequence. Necessity is nowhere to be found.
☛ Hume on substance
Experience is also the death of substance. The basic concept of a substance is that of a continuant*. Here is a door; I have been looking at it for five minutes. I have been looking at a continuant (even if we want to add that imperceptible changes have happened to it). Now, Hume pointed out, all that I actually experienced was a succession of impressions of a door. When in all this time did I have the impression, the experience, of a continuant ? I never did. I simply had a series of impressions onto which I projected the idea that they were impressions of the same door over time. I did not experience continuity.
If we put to Hume the objection that if the door is not a continuant but only projected as such my me, what about my own continuity in looking at the door and making the projection ? Hume in fact concedes that the continuity involved in personal identity is equally a projection. My personal identity consists in nothing but a series of impressions. There is only 'a bundle or collection of different perceptions [impressions], which succeed each other with an inconceivable rapidity, and are in a perpetual flux and movement' (T I.iv.6). But then, if I am really nothing but one impression after another, how could the idea of a series of impressions arise ? Nothing persists through the series to be aware of a series.
☛ **Hume's problems (1)
Hume realises the problem : 'I am sensible [aware], that my account is very defective' (Appendix, Treatise of Human Nature). He never remedied the defect and did not return to the topic of personal identity in later writings.
☛ A word on substance
*'Substance' translates the Greek term, ousia, and more specifically specifies what continues and remains unaltered beneath (quod substat in Latin : what stands uder) change. Socrates is a substance (or was) : he could grow, he could think, he could age, he could fall in love, he could be put on trial, but all these changes were changes of the continuant, Socrates. (Not my view, just exposition.)
☛ Hume's problems (2)
Hume does face some problems : if all ideas derive from impressions then how can we have ideas, such as necessity and continuity, of which we do not and cannot have impressions ? He tries to find a way around this rather serious difficulty, unsuccessfully in my view.
☛ Analytic/ synthetic, no : relations of ideas & matters of fact, yes
Hume talks, by the way, of relations of ideas and matters of fact : that is his distinction. He does not to the best of my knowledge use the terms 'analytic; or 'synthetic'. '1 + 3 = 4' and 'a triangle has three sides and three internal angles' are examples of relations of ideas. 'There was a full moon last night' is a matter of fact. This doesn't mean that it is true, but only that it is logically possible for its contradictory to be true. 'There was not a full moon last night' could be true : by contrast, the contradictory of 'a triangle has three sides and three internal angles' cannot be true.
Hume's distinction between relations of ideas and matters of fact can be compared with the analytic/ synthetic distinction but that is a different matter.
Hume, Treatise of Human Nature (1739-40), I.iii, 1-14 (esp. 14); I.iv.7.
Hume, Enquiry concerning Human Understanding (1748), IV-VII.
Hume, Treatise of Human Nature, I.iv.3; I.iv.6.
▻ Personal identity
Hume, Treatise of Human Nature, I.iv.6; Appendix.
▻ Relations of ideas and matters of fact
Hume, Enquiry concerning Human Understanding, IV (first two paras.).