Here is the redefinition of the bibliography environment:
\begin{filecontents*}{lib.bib}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
\end{filecontents*}
\documentclass[oneside]{book}
% Renew bibliography environement
\makeatletter
\renewenvironment{thebibliography}[1]
{\chapter{\bibname}% <-- this line was changed from \chapter* to \chapter so the number appear
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{document}
\chapter{My Chapter}
Here is a citation \cite{goossens93}.
\bibliographystyle{apalike}
\bibliography{lib}
\end{document}
So the bibliography appear as a normal chapter using the chapter numbering system. Adding a * after chapter will bring the bibliography back to normal (no number).


A variant without a bibfile, only using bibitems would be:
\documentclass[oneside]{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
% Renew bibliography environement
\makeatletter
\renewenvironment{thebibliography}[1]
{\chapter{\bibname}% <-- this line was changed from \chapter* to \chapter so the number appear
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother
\begin{document}
\chapter{My first chapter}
blablabla
\bibliographystyle{apalike}
\begin{thebibliography}{}
\bibitem[Xyz 2010]{xyz-2010}
Xyz. et. al. (2010). Blabla.
\bibitem{Simpson} Homer J. Simpson. \textsl{Mmmmm...donuts}.
Evergreen Terrace Printing Co., Springfield, SomewhereUSA, 1998
\end{thebibliography}
\end{document}
Hope it helps.
Romain
\chapter{}
to insert the bibliography. – Sigur May 19 '18 at 13:54