While this article offers some interesting tips, http://publishedtodeath.blogspot.com/2017/07/getting-your-self-published-book-into.html, take it from me, when it comes to self-published books the library is not likely to find a place for your works. The major providers of books to libraries, Baker and Taylor and Ingram, do very little for self-published and or print on demand books. The other side is the demand in libraries still falls within the confines of the monolithic New York Best Sellers Lists. There is only so much money in the book budget and when 250 people want to read the latest Patterson book you can bet the library has to order many copies.
Another side to this has to do with vetting the titles. Libraries are very conscious of works that will for lack of a better term, ruffle the feathers of their patrons. There is a huge concern in libraries that because self-published works do not fall within the same editing and proofing routines of traditionally published books they will contain content that would put the library in an awkward light. I have to say some of that may be justified. Books with erroneous information or unsubstantiated information would definitely incur the ire of any librarian, this one included. The degree of this is subjective and even extends to traditionally published books but on the whole the concern mostly falls on self-published books justified or not. That is to say nothing of books who have not been properly edited, both for story and development as well as copy editing.
Where does that leave all the writers doing it on their own or via a small or niche house? Well you still should frequent your local library. There are programs for writers and if it is a library that processes their own books you may still see your works on the shelf if you strike up a friendly conversation with the director. Please take this for what it is, my take on things I see everyday. Other libraries may have different policies so please check with them. I just wanted to write about what I have seen and told to writers who have come to my library.